diff --git a/src/views/components/tempDialog/index.vue b/src/views/components/tempDialog/index.vue index 8f678c8..a808f04 100644 --- a/src/views/components/tempDialog/index.vue +++ b/src/views/components/tempDialog/index.vue @@ -4,7 +4,7 @@ * @Author: JC9527 * @Date: 2023-09-28 11:25:48 * @LastEditors: JC9527 - * @LastEditTime: 2023-09-30 14:01:06 + * @LastEditTime: 2023-10-01 01:22:07 --> - - - - - - - - - - - - - - - - - - - - - - - - - - 确认修改 - 关闭 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + 确认修改 + 关闭 + + + + + {{ item.value}} + + + @@ -95,7 +107,41 @@ export default { id:'', readonly:false, loading:true, - title:'查看详情' + title:'查看详情', + listDes:[ + { + tag:'entprName', + label:'企业名称', + value:'', + },{ + tag:'district', + label:'行政区划', + value:'', + },{ + tag:'createTime', + label:'发布时间', + value:'', + },{ + tag:'plannedYear', + label:'计划年月', + value:'', + },{ + tag:'planName', + label:'计划标题', + value:'', + span:2, + },{ + tag:'planContent', + label:'计划内容', + value:'', + span:2, + },{ + tag:'remark', + label:'备注', + value:'', + span:2, + }, + ] } }, computed: { @@ -107,7 +153,7 @@ export default { open(item,id) { console.log(item) this.id = item.id - this.getMyData(item.id) + this.getMyData(item.id,id) if(id == 0) { this.readonly = true; this.title = '查看详情' @@ -117,20 +163,47 @@ export default { } this.dialogVisible = true; }, - async getMyData(id){ - // console.log(id) - // console.log(data) + async getMyData(id,idTwo){ this.loading = true; let data = await this.$api.yingji.bPlanManageTwo(id) if(data.code == 200){ let { entprName,district,createTime,plannedYear,planName,planContent,remark } = data.data + // let listData = data.data this.mydistrict = district let myDistrict = this.componendDistrict(district) let mycreateTime = createTime.split(' ')[0] - this.form = { entprName,district:myDistrict,createTime:mycreateTime,plannedYear,planName,planContent,remark } + if(idTwo == 2) { + let obj = { entprName,myDistrict,mycreateTime,plannedYear,planName,planContent,remark } + this.changeDescriptions(this.listDes,...Object.values(obj)) + // for(let key in listData){ + // this.listDes.forEach((value1, index1) => { + // if (key == value1.tag) { + // this.listDes[index1].value = listData[key]; + // return; + // } + // }); + // } + // this.listDes.forEach((value1, index1) => { + // //重大危险源等级 + // if (value1.tag == "district") { + // this.listDes[index1].value = myDistrict; + // } + // //经济类型大类 + // if (value1.tag == "createTime") { + // this.listDes[index1].value = mycreateTime; + // } + // }) + } else { + this.form = { entprName,district:myDistrict,createTime:mycreateTime,plannedYear,planName,planContent,remark } + } this.loading = false; } }, + changeDescriptions(arr,...items){ + items.map((item,index)=>{ + arr[index].value = item || '/' + }) + }, Close(item) { this.dialogVisible = false; Object.keys(this.form).forEach((key) => (this.form[key] = "")); @@ -205,6 +278,18 @@ export default { }