Przeglądaj źródła

修改 修改数据

Qukatie 8 miesięcy temu
rodzic
commit
8a73ab12ee

+ 20 - 10
src/views/serviceConfiguration/modifyData/detailsPage.vue

@@ -10,7 +10,7 @@
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" size="small" @click="submit">提 交
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    @click="save" :disabled="form.approvalStatus=='审核提交'">保 存
+                    @click="save" :disabled="form.approvalStatus == '审核提交'">保 存
                 </el-button>
             </div>
         </div>
@@ -18,9 +18,11 @@
             <trade-card title="基础信息">
                 <avue-form :option="optionForm" v-model="form" ref="form">
                     <template slot="menuForm">
-                        <el-button icon="el-icon-search" type="primary" :disabled="data.length > 0||form.approvalStatus=='审核提交'"
+                        <el-button icon="el-icon-search" type="primary"
+                            :disabled="data.length > 0 || form.approvalStatus == '审核提交'"
                             @click="searchChange">获取配置信息</el-button>
-                        <el-button icon="el-icon-search" type="success" :disabled="data.length == 0||form.approvalStatus=='审核提交'"
+                        <el-button icon="el-icon-search" type="success"
+                            :disabled="data.length == 0 || form.approvalStatus == '审核提交'"
                             @click="getData">获取原始信息</el-button>
                     </template>
                 </avue-form>
@@ -32,9 +34,10 @@
                     @saveColumn="saveColumn('crud', 'option', 'optionBack', 415)">
                     <template slot-scope="{type,size,row,index}" slot="menu">
                         <el-button size="small" type="text" icon="el-icon-edit"
-                            @click.stop="$refs.crud.rowEdit(row, index)" :disabled="form.approvalStatus=='审核提交'">编 辑
+                            @click.stop="$refs.crud.rowEdit(row, index)" :disabled="form.approvalStatus == '审核提交'">编 辑
                         </el-button>
-                        <el-button size="small" icon="el-icon-delete" type="text" @click.stop="rowDel(row, index)" :disabled="form.approvalStatus=='审核提交'">删
+                        <el-button size="small" icon="el-icon-delete" type="text" @click.stop="rowDel(row, index)"
+                            :disabled="form.approvalStatus == '审核提交'">删
                             除</el-button>
                     </template>
                     <template slot-scope="{type,disabled}" slot="fieldValueNewNameForm">
@@ -234,7 +237,7 @@ export default {
         if (this.$route.query.billId) {
             this.getDetails(this.$route.query.billId)
         }
-        console.log(this.detailData.id,123123)
+        console.log(this.detailData.id, 123123)
         if (this.detailData.id) {
             this.getDetails(this.detailData.id)
         }
@@ -242,8 +245,15 @@ export default {
     methods: {
         rowUpdate(row, index, done, loading) {
             done()
-            this.data[index].fieldValueNew = row.fieldValueNew
-            this.data[index].fieldValueNewName = row.fieldValueNewName
+            console.log(row)
+            if (row.fieldValueType == "选择器") {
+                this.data[index].fieldValueNew = row.fieldValueNew
+                this.data[index].fieldValueNewName = row.fieldValueNewName
+            } else {
+                this.data[index].fieldValueNew = row.fieldValueNewName
+                this.data[index].fieldValueNewName = row.fieldValueNewName
+            }
+
         },
         searchChange() {
             this.form.updateItemList = []
@@ -312,8 +322,8 @@ export default {
             getDetail({ id: id }).then(res => {
                 this.form = res.data.data
                 this.data = res.data.data.updateItemList
-                if(res.data.data.approvalStatus=="审核提交"){
-                    this.optionForm.disabled=true
+                if (res.data.data.approvalStatus == "审核提交") {
+                    this.optionForm.disabled = true
                 }
             }).finally(() => {
                 loading.close()