From 1920c366499e36d60e18a4894de786d04394d06a Mon Sep 17 00:00:00 2001 From: weikai <123456> Date: Tue, 8 Dec 2020 15:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90pc=E7=AB=AF=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=AE=9E=E4=BD=93=E5=8C=96=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E3=80=91-=E3=80=90=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E3=80=91-=EF=BC=88?= =?UTF-8?q?=E9=AD=8F=E5=87=AF=EF=BC=89-2020/12/08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/kpi/kpisubpositiondetail.vue | 92 +++++++++++-------- 1 file changed, 56 insertions(+), 36 deletions(-) diff --git a/src/views/modules/kpi/kpisubpositiondetail.vue b/src/views/modules/kpi/kpisubpositiondetail.vue index 06333d53..91fc25b8 100644 --- a/src/views/modules/kpi/kpisubpositiondetail.vue +++ b/src/views/modules/kpi/kpisubpositiondetail.vue @@ -119,9 +119,9 @@ placeholder="请选择"> + :key="item.id" + :label="item.name" + :value="item.id"> @@ -150,12 +150,14 @@ export default { dataForm: { grids:[], subDetail:[], + files:[], + images: [], }, options :[], isAble:false, gridIds:[], //页面加载控制 - pageloading:false, + pageloading:true, //图片组件 loading: false, //图片组件参数 @@ -193,7 +195,6 @@ export default { } else { } - this.getFormDataInfo() }, methods: { init () { @@ -307,46 +308,50 @@ export default { }, getOptions () { this.$http - .get(`/sys/user/deptOptions/getByLoginUser`) + .get(`/kpi/subdetail/getgrids`) .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } - this.options = res.data.options + this.options = res.data }) .catch(() => {}) }, getCheckInfo(){ - this.checkDiction=[ - { - id:'01f23eecdda4f20ef58fd2cb344ab3bf', - label:'建站达标', - childDiction:[ - { - id:'009ff607df016a3fc1e15a08651c8977', - label:'网格要有布局合理、功能综合,(可共用、共建,原则上不能超过3个网格共用一处)党群服务站' - }, - { - id:'2ff0833824d341e6bd26717c49e0ff33', - label:'网格划分边界清析、不交叉、不重叠,实现多网合一' - } - ] - }, - { - id:'ae35fb5792b9ecaa316b1c238fbffd2b', - label:'人员配备', - childDiction:[ - - ] + this.$http.get(`kpi/subcheckdictionary/getdetaildict`).then(({ data: res }) => { + this.pageloading = false + if (res.code !== 0) { + return this.$message.error(res.msg) } - ] - }, - - // 获取生成代码所需信息信息 - getFormDataInfo () { + this.checkDiction = res.data + }).catch(() => {}) + // this.checkDiction=[ + // { + // id:'01f23eecdda4f20ef58fd2cb344ab3bf', + // label:'建站达标', + // childDiction:[ + // { + // id:'009ff607df016a3fc1e15a08651c8977', + // label:'网格要有布局合理、功能综合,(可共用、共建,原则上不能超过3个网格共用一处)党群服务站' + // }, + // { + // id:'2ff0833824d341e6bd26717c49e0ff33', + // label:'网格划分边界清析、不交叉、不重叠,实现多网合一' + // } + // ] + // }, + // { + // id:'ae35fb5792b9ecaa316b1c238fbffd2b', + // label:'人员配备', + // childDiction:[ + // + // ] + // } + // ] }, + // 表单提交 dataFormSubmitHandle: debounce(function () { @@ -363,33 +368,48 @@ export default { let childDesribe = j.describe; //图片 let childUrl = j.images === undefined ? [] :j.images.url; + //缩略图 + let thumbnail = j.images === undefined ? [] :j.images.thumbnail; //文件 let childFile =j.files === undefined ? [] : j.files; + let littleId = j.id; let m = { + id:j.infoId, + pCheckItemName :bigId, + checkItemName: littleId, desribe: childDesribe, imageUrl: childUrl, + thumbnail:thumbnail, files: childFile } subChild.push(m) } }else { - console.log(i) let childDesribe = i.describe; let childUrl = i.images === undefined ?[]:i.images.url; + let thumbnail = i.images === undefined ? [] :j.images.thumbnail; let childFile = i.files === undefined ?[]:i.files; let ai = { + id:i.infoId, desribe:childDesribe, + pCheckItemName :bigId, + checkItemName: '', imageUrl :childUrl, + thumbnail:thumbnail, files:childFile } subChild.push(ai) } - } - this.dataForm.subDetail =subChild debugger + let pateDate={ + infoId : this.dataForm.id, + gridIds:this.dataForm.grids, + infoDetail:subChild + } + console.log(pateDate) }, 1000, { 'leading': true, 'trailing': false }) },