Просмотр исходного кода

fix:补充文件分类设置到质量管理下

liujiayin 2 лет назад
Родитель
Сommit
d05dc07293
2 измененных файлов с 69 добавлено и 45 удалено
  1. 18 3
      src/views/platform/cat/type/manage.vue
  2. 51 42
      src/views/platform/cat/type/sort.vue

+ 18 - 3
src/views/platform/cat/type/manage.vue

@@ -65,6 +65,8 @@
             :id="editId"
             :visible="sortFormVisible"
             title="分类排序"
+            :categoryKey="categoryKey"
+            :diDian="diDian"
             @callback="callback"
             @close="visible => sortFormVisible = visible"
         />
@@ -151,7 +153,7 @@ export default {
             nodeData: {},
             isPrivate: false,
             type: {},
-            categoryKey: 'FLOW_TYPE',
+            categoryKey: '',
             categoryOptions: [],
             show: false
         }
@@ -164,9 +166,23 @@ export default {
     // 加载下拉框 分类标识数据
         loadCategoryData () {
             this.loading = true
-            queryPageList({}).then(response => {
+            let whereParams = {} 
+            if(this.$router.currentRoute.fullPath == '/zlgl/wjkzgl/wjjflsz'){
+                this.categoryKey = 'FILE_TYPE'
+                whereParams={
+                    "parameters":[
+                    {
+                        "key": "Q^category_key_^SL",
+                        "value": "FILE_TYPE"
+                    }
+                ]}
+            }else{
+                this.categoryKey = 'FLOW_TYPE' 
+            }
+            queryPageList(whereParams).then(response => {
                 this.categoryOptions = response.data.dataResult
                 this.loading = false
+                
             }).catch(() => {
                 this.loading = false
             })
@@ -187,7 +203,6 @@ export default {
             })
         },
         handleTreeAction (command, position, selection, data) {
-            console.log('data',data)
             if(data.sn == 0 && data.name == "文件分类"){
                 const object = {
                     diDian:this.diDian,

+ 51 - 42
src/views/platform/cat/type/sort.vue

@@ -1,41 +1,46 @@
 <template>
-  <el-dialog
-    :title="title"
-    :visible.sync="dialogVisible"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    class="dialog type-sort-dialog"
-    @open="getFormData"
-    @close="closeDialog"
-  >
-    <el-container
-      v-loading="dialogLoading"
-      :element-loading-text="$t('common.loading')"
-    >
+  <el-dialog :title="title"
+             :visible.sync="dialogVisible"
+             :close-on-click-modal="false"
+             :close-on-press-escape="false"
+             append-to-body
+             class="dialog type-sort-dialog"
+             @open="getFormData"
+             @close="closeDialog">
+    <el-container v-loading="dialogLoading"
+                  :element-loading-text="$t('common.loading')">
       <el-main>
-        <div v-for="option in data" :key="option.id">
-          <el-checkbox v-model="option.checked" @change="onClick(option)">
+        <div v-for="option in data"
+             :key="option.id">
+          <el-checkbox v-model="option.checked"
+                       @change="onClick(option)">
             {{ option.name }}
           </el-checkbox>
         </div>
 
       </el-main>
       <el-aside width="150px">
-        <el-button type="primary" icon="el-icon-upload2" @click="top">顶部</el-button><br>
+        <el-button type="primary"
+                   icon="el-icon-upload2"
+                   @click="top">顶部</el-button><br>
         <div class="button-padding" />
-        <el-button type="primary" icon="el-icon-top" @click="up">向上</el-button><br>
+        <el-button type="primary"
+                   icon="el-icon-top"
+                   @click="up">向上</el-button><br>
         <div class="button-padding" />
-        <el-button type="primary" icon="el-icon-bottom" @click="down">向下</el-button><br>
+        <el-button type="primary"
+                   icon="el-icon-bottom"
+                   @click="down">向下</el-button><br>
         <div class="button-padding" />
-        <el-button type="primary" icon="el-icon-download" @click="buttom">底部</el-button><br>
+        <el-button type="primary"
+                   icon="el-icon-download"
+                   @click="buttom">底部</el-button><br>
       </el-aside>
     </el-container>
-    <div slot="footer" class="el-dialog--center">
-      <ibps-toolbar
-        :actions="toolbars"
-        @action-event="handleActionEvent"
-      />
+    <div slot="footer"
+         class="el-dialog--center">
+      <ibps-toolbar :actions="toolbars"
+                    @action-event="handleActionEvent" />
     </div>
   </el-dialog>
 </template>
@@ -52,8 +57,9 @@ export default {
       default: false
     },
     id: String,
-    title: String
-
+    title: String,
+    categoryKey: String,
+    diDian: String
   },
   data() {
     return {
@@ -83,7 +89,7 @@ export default {
   },
   watch: {
     visible: {
-      handler: function(val, oldVal) {
+      handler: function (val, oldVal) {
         this.dialogVisible = this.visible
         // 关闭清除数据,刷新树
         this.data = []
@@ -109,7 +115,7 @@ export default {
     handleSave() {
       const data = this.data
       const ids = []
-      data.forEach(function(v) { ids.push(v.id) })
+      data.forEach(function (v) { ids.push(v.id) })
       this.ids = ids
 
       this.saveData()
@@ -139,9 +145,13 @@ export default {
         return
       }
       this.dialogLoading = true
-      sortList({
+      let whererParams = {
         typeId: this.formId
-      }).then(response => {
+      }
+      if (this.categoryKey == 'FILE_TYPE') {
+        whererParams.diDian = this.diDian
+      }
+      sortList(whererParams).then(response => {
         this.data = response.data
         this.dialogLoading = false
       }).catch(() => {
@@ -181,19 +191,18 @@ export default {
 }
 </script>
 <style lang="scss">
-.type-sort-dialog{
+.type-sort-dialog {
   // .el-dialog__body{
   //   height:  calc(27vh - 120px) !important;
   // }
-  .button-padding{
-  height: 5px;
-}
-.el-main{
-  border: 1px #d4d4de solid;
-}
-.el-aside{
-  padding-left: 20px;
-}
+  .button-padding {
+    height: 5px;
+  }
+  .el-main {
+    border: 1px #d4d4de solid;
+  }
+  .el-aside {
+    padding-left: 20px;
+  }
 }
-
 </style>