Răsfoiți Sursa

fix:调整文件查阅逻辑

liujiayin 2 ani în urmă
părinte
comite
57721b6633

+ 24 - 12
src/views/infosManage/externalFiles/externalFiles.vue

@@ -68,15 +68,15 @@ export default {
       orgName: '',
       loading: false,
       typeData: [
-        { id: '0', label: 'CNAS相关文件' },
-        { id: '1', label: 'CMA相关文件' },
-        { id: '2', label: '法律法规' },
-        { id: '3', label: '检测标准' },
-        { id: '4', label: '设备说明书' },
-        { id: '5', label: '试剂耗材说明书' },
-        { id: '6', label: '标准物质证书' },
-        { id: '7', label: '参考技术文献(受限)' },
-        { id: '8', label: '客户技术资料(受限)' },
+        // { id: '0', label: 'CNAS相关文件' },
+        // { id: '1', label: 'CMA相关文件' },
+        // { id: '2', label: '法律法规' },
+        // { id: '3', label: '检测标准' },
+        // { id: '4', label: '设备说明书' },
+        // { id: '5', label: '试剂耗材说明书' },
+        // { id: '6', label: '标准物质证书' },
+        // { id: '7', label: '参考技术文献(受限)' },
+        // { id: '8', label: '客户技术资料(受限)' },
       ],
       filterText: '',
       defaultProps: {
@@ -138,7 +138,7 @@ export default {
     }
   },
   mounted() {
-    // this.loadNode()
+    this.getType()
   },
   methods: {
     filterNode(value, data) {
@@ -148,6 +148,18 @@ export default {
     loadNode() {
       this.loading = true
     },
+    getType() {
+      let sql = `select * FROM t_skwjlxpzb WHERE wen_jian_lei_xing = '外部文件' order by pai_lie_shun_xu_ asc`
+      curdPost('sql', sql).then(res => {
+        let typeDatas = res.variables.data
+        for (var i of typeDatas) {
+          let type = {}
+          type.id = i.pai_lie_shun_xu_
+          type.label = i.wen_jian_xi_lei_
+          this.typeData.push(type)
+        }
+      })
+    },
     getDatas(sorts) {
       this.listData = []
       let wheres = ''
@@ -157,7 +169,7 @@ export default {
       }
 
       if (sorts.fileType) {
-        wheres = wheres + ` and wj.wai_bu_wen_jian_l = '${sorts.fileType}'`
+        wheres = wheres + ` and wj.wen_jian_lie_xing = '${sorts.fileType}'`
       }
       if (sorts.fileName) {
         wheres = wheres + ` and wj.wen_jian_ming_che like '%${sorts.fileName}%'`
@@ -217,7 +229,7 @@ export default {
         return
       } else {
         this.getDatas({
-          fileType: this.typeData[data.id].label,
+          fileType: this.typeData[data.id - 1].label,
           userId: this.$store.getters.userInfo.employee.id,
           sorts: { 'wen_jian_bian_hao': 'desc' }
         })

+ 33 - 20
src/views/infosManage/internalFiles/internalFiles.vue

@@ -69,25 +69,25 @@ export default {
       orgName: '',
       loading: false,
       typeData: [
-        { id: '0', label: '质量手册' },
-        { id: '1', label: '程序文件' },
-        { id: '2', label: '程序文件表单' },
-        { id: '3', label: '检测方法SOP' },
-        { id: '4', label: '设备操作维护SOP' },
-        { id: '5', label: '设备设施验证SOP' },
-        { id: '6', label: '检测方法验证SOP' },
-        { id: '7', label: '管理类SOP' },
-        { id: '8', label: '检测方法SOP表单' },
-        { id: '9', label: '设备操作维护SOP表单' },
-        { id: '10', label: '设备设施验证SOP表单' },
-        { id: '11', label: '检测方法验证SOP表单' },
-        { id: '12', label: '管理类SOP表单' },
-        { id: '13', label: '公司管理制度' },
-        { id: '14', label: '非检测方法SOP' },
-        { id: '15', label: '检测方法确认SOP' },
-        { id: '16', label: '非标确认规定' },
-        { id: '17', label: '非检测方法SOP表单' },
-        { id: '18', label: '非检测方法确认SOP表单' },
+        // { id: '0', label: '质量手册' },
+        // { id: '1', label: '程序文件' },
+        // { id: '2', label: '程序文件表单' },
+        // { id: '3', label: '检测方法SOP' },
+        // { id: '4', label: '设备操作维护SOP' },
+        // { id: '5', label: '设备设施验证SOP' },
+        // { id: '6', label: '检测方法验证SOP' },
+        // { id: '7', label: '管理类SOP' },
+        // { id: '8', label: '检测方法SOP表单' },
+        // { id: '9', label: '设备操作维护SOP表单' },
+        // { id: '10', label: '设备设施验证SOP表单' },
+        // { id: '11', label: '检测方法验证SOP表单' },
+        // { id: '12', label: '管理类SOP表单' },
+        // { id: '13', label: '公司管理制度' },
+        // { id: '14', label: '非检测方法SOP' },
+        // { id: '15', label: '检测方法确认SOP' },
+        // { id: '16', label: '非标确认规定' },
+        // { id: '17', label: '非检测方法SOP表单' },
+        // { id: '18', label: '非检测方法确认SOP表单' },
       ],
       filterText: '',
       defaultProps: {
@@ -150,6 +150,7 @@ export default {
   },
   mounted() {
     // this.loadNode()
+    this.getType()
   },
   methods: {
     filterNode(value, data) {
@@ -170,6 +171,18 @@ export default {
       //     this.loading = false
       // })
     },
+    getType() {
+      let sql = `select * FROM t_skwjlxpzb WHERE wen_jian_lei_xing = '内部文件' order by pai_lie_shun_xu_ asc`
+      curdPost('sql', sql).then(res => {
+        let typeDatas = res.variables.data
+        for (var i of typeDatas) {
+          let type = {}
+          type.id = i.pai_lie_shun_xu_
+          type.label = i.wen_jian_xi_lei_
+          this.typeData.push(type)
+        }
+      })
+    },
     getDatas(sorts) {
       this.listData = []
       let wheres = ''
@@ -231,7 +244,7 @@ export default {
         return
       } else {
         this.getDatas({
-          fileType: this.typeData[data.id].label,
+          fileType: this.typeData[data.id - 1].label,
           userId: this.$store.getters.userInfo.employee.id,
           sorts: { 'wen_jian_bian_hao': 'desc' }
         })