Browse Source

【pc端 添加网格实体化指标详情】-【基础页面添加】-(魏凯)-2020/12/08

master
weikai 5 years ago
parent
commit
1920c36649
  1. 90
      src/views/modules/kpi/kpisubpositiondetail.vue

90
src/views/modules/kpi/kpisubpositiondetail.vue

@ -119,9 +119,9 @@
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.id"
:label="item.label" :label="item.name"
:value="item.value"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -150,12 +150,14 @@ export default {
dataForm: { dataForm: {
grids:[], grids:[],
subDetail:[], subDetail:[],
files:[],
images: [],
}, },
options :[], options :[],
isAble:false, isAble:false,
gridIds:[], gridIds:[],
// //
pageloading:false, pageloading:true,
// //
loading: false, loading: false,
// //
@ -193,7 +195,6 @@ export default {
} else { } else {
} }
this.getFormDataInfo()
}, },
methods: { methods: {
init () { init () {
@ -307,46 +308,50 @@ export default {
}, },
getOptions () { getOptions () {
this.$http this.$http
.get(`/sys/user/deptOptions/getByLoginUser`) .get(`/kpi/subdetail/getgrids`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.options = res.data.options this.options = res.data
}) })
.catch(() => {}) .catch(() => {})
}, },
getCheckInfo(){ getCheckInfo(){
this.checkDiction=[ this.$http.get(`kpi/subcheckdictionary/getdetaildict`).then(({ data: res }) => {
{ this.pageloading = false
id:'01f23eecdda4f20ef58fd2cb344ab3bf', if (res.code !== 0) {
label:'建站达标', return this.$message.error(res.msg)
childDiction:[
{
id:'009ff607df016a3fc1e15a08651c8977',
label:'网格要有布局合理、功能综合,(可共用、共建,原则上不能超过3个网格共用一处)党群服务站'
},
{
id:'2ff0833824d341e6bd26717c49e0ff33',
label:'网格划分边界清析、不交叉、不重叠,实现多网合一'
} }
] this.checkDiction = res.data
},
{
id:'ae35fb5792b9ecaa316b1c238fbffd2b',
label:'人员配备',
childDiction:[
] }).catch(() => {})
} // this.checkDiction=[
] // {
// id:'01f23eecdda4f20ef58fd2cb344ab3bf',
// label:'',
// childDiction:[
// {
// id:'009ff607df016a3fc1e15a08651c8977',
// label:'3'
// },
// {
// id:'2ff0833824d341e6bd26717c49e0ff33',
// label:''
// }
// ]
// },
// {
// id:'ae35fb5792b9ecaa316b1c238fbffd2b',
// label:'',
// childDiction:[
//
// ]
// }
// ]
}, },
//
getFormDataInfo () {
},
// //
dataFormSubmitHandle: debounce(function () { dataFormSubmitHandle: debounce(function () {
@ -363,33 +368,48 @@ export default {
let childDesribe = j.describe; let childDesribe = j.describe;
// //
let childUrl = j.images === undefined ? [] :j.images.url; let childUrl = j.images === undefined ? [] :j.images.url;
//
let thumbnail = j.images === undefined ? [] :j.images.thumbnail;
// //
let childFile =j.files === undefined ? [] : j.files; let childFile =j.files === undefined ? [] : j.files;
let littleId = j.id;
let m = { let m = {
id:j.infoId,
pCheckItemName :bigId,
checkItemName: littleId,
desribe: childDesribe, desribe: childDesribe,
imageUrl: childUrl, imageUrl: childUrl,
thumbnail:thumbnail,
files: childFile files: childFile
} }
subChild.push(m) subChild.push(m)
} }
}else { }else {
console.log(i)
let childDesribe = i.describe; let childDesribe = i.describe;
let childUrl = i.images === undefined ?[]:i.images.url; let childUrl = i.images === undefined ?[]:i.images.url;
let thumbnail = i.images === undefined ? [] :j.images.thumbnail;
let childFile = i.files === undefined ?[]:i.files; let childFile = i.files === undefined ?[]:i.files;
let ai = { let ai = {
id:i.infoId,
desribe:childDesribe, desribe:childDesribe,
pCheckItemName :bigId,
checkItemName: '',
imageUrl :childUrl, imageUrl :childUrl,
thumbnail:thumbnail,
files:childFile files:childFile
} }
subChild.push(ai) subChild.push(ai)
} }
} }
this.dataForm.subDetail =subChild this.dataForm.subDetail =subChild
debugger debugger
let pateDate={
infoId : this.dataForm.id,
gridIds:this.dataForm.grids,
infoDetail:subChild
}
console.log(pateDate)
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { 'leading': true, 'trailing': false })
}, },

Loading…
Cancel
Save