Răsfoiți Sursa

字段共享更新

maxiaoxiao 9 luni în urmă
părinte
comite
d614f1aa03

+ 7 - 3
src/views/ResourceShare/sharedLocation/components/fieldSetModal.vue

@@ -38,6 +38,7 @@
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="refresh">刷新字段列表</el-button>
         <el-button type="primary" @click="submit">保存</el-button>
         <el-button @click="close">关闭</el-button>
       </span>
@@ -67,11 +68,11 @@ export default {
     Init(rowdata) {
       this.formData = rowdata;
       this.dialogVisible = true;
-      this.getfieldList(rowdata.bsm);
+      this.getfieldList(rowdata.bsm, false);
     },
-    async getfieldList(id) {
+    async getfieldList(zymlBsm, resetType) {
       this.fieldList = [];
-      let res = await Getfiledslist({ id });
+      let res = await Getfiledslist({ zymlBsm, resetType });
       // this.fieldList = res.data;
       res.data.forEach((field) => {
         this.fieldList.push({ ...field, checked: field.shareDisplay == 0 });
@@ -80,6 +81,9 @@ export default {
     changeShare(row, index) {
       this.fieldList[index].shareDisplay = row.checked ? 0 : 1;
     },
+    refresh() {
+      this.getfieldList(this.formData.bsm, false);
+    },
     async submit() {
       fileds(this.fieldList).then((res) => {
         if ((res.code = 200)) {