Browse Source

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

master
weikai 5 years ago
parent
commit
a20bf73090
  1. 16
      src/views/modules/kpi/kpisubpositiondetail.vue

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

@ -111,7 +111,7 @@
</div> </div>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :disabled="pageDisabled"> <el-form :model="dataForm" :rules="dataRule" ref="dataForm">
<el-form-item label="关联网格:" prop="grids" label-width="90px" style="font-weight:bold"> <el-form-item label="关联网格:" prop="grids" label-width="90px" style="font-weight:bold">
<el-select <el-select
v-model="dataForm.grids" v-model="dataForm.grids"
@ -227,15 +227,14 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http.get(`/kpi/subdetail/getInfogrid/${this.dataForm.id}`).then(({ data: res }) => { this.$http.get(`/kpi/subdetail/getInfogrid/${this.dataForm.id}`).then(({ data: res }) => {
this.pageloading = false
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.dataForm.grids = res.data this.dataForm.grids = res.data
}).catch(() => {}) }).catch(() => {})
this.getInfoById();
this.getOptionsById(); this.getOptionsById();
this.getInfoById();
}else { }else {
this.getCheckInfo(); this.getCheckInfo();
this.getOptions(); this.getOptions();
@ -428,28 +427,29 @@ export default {
getCheckInfo(){ getCheckInfo(){
this.$http.get(`kpi/subcheckdictionary/getdetaildict`).then(({ data: res }) => { this.$http.get(`kpi/subcheckdictionary/getdetaildict`).then(({ data: res }) => {
this.pageloading = false
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.checkDiction = res.data this.checkDiction = res.data
this.pageloading = false
}).catch(() => {}) }).catch(() => {})
}, },
getInfoById(){ getInfoById(){
this.$http.get(`/kpi/subdetail/getSubDetailInfoByInfoId/${this.dataForm.id}`).then(({ data: res }) => { this.$http.get(`/kpi/subdetail/getSubDetailInfoByInfoId/${this.dataForm.id}`).then(({ data: res }) => {
this.pageloading = false
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.checkDiction = res.data this.checkDiction = res.data
this.pageloading = false
}).catch(() => {}) }).catch(() => {})
}, },
// //
dataFormSubmitHandle: debounce(function () { dataFormSubmitHandle: debounce(function () {
this.pageloading = true;
this.isAble = true;
// 0 // 0
let remindInfo = '' let remindInfo = ''
// //
@ -460,7 +460,6 @@ export default {
if (childSub.length>0) { if (childSub.length>0) {
for (let j of childSub) { for (let j of childSub) {
// //
console.log(j)
let childDesribe = j.describe; let childDesribe = j.describe;
// //
let childFile =j.files === [] ? [] : j.files; let childFile =j.files === [] ? [] : j.files;
@ -528,7 +527,8 @@ export default {
} }
console.log(pateDate); console.log(pateDate);
this.$http[!this.dataForm.id ? 'post' : 'put'](`kpi/subdetail/addDetail`,pateDate).then(({ data: res }) => { this.$http[!this.dataForm.id ? 'post' : 'put'](`kpi/subdetail/addDetail`,pateDate).then(({ data: res }) => {
this.pageloading = false this.pageloading = false;
this.isAble = false;
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }

Loading…
Cancel
Save