missMyLove 3 лет назад
Родитель
Сommit
5b428cf665

+ 7 - 2
src/components/eloamApplyCard.vue

@@ -1,10 +1,15 @@
 <template>
   <div :style="outerStyles" @click="customClick">
-    <div v-if="itemModel" style="padding-top: 10px;padding-left:10px;font-size: 18px"><strong>{{itemModel}}</strong>
+    <div v-if="itemModel" style="padding-top: 10px;padding-left:10px;font-size: 18px">
+      <p :title="itemModel" style="width: 160px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;"><strong>{{itemModel}}</strong></p>
         <Badge style="position: absolute;top:1%;right: 1%;" :text="itemType === 0?'公开':(itemType === 1?'私密':'机密')" :class-name="itemType === 0?'demo-badge-alone':(itemType === 1?'demo-blue-alone':'demo-red-alone')">
         </Badge>
     </div>
-    <div v-if="itemName" style="padding-bottom: 10px;padding-left:10px;font-size: 14px">{{itemName}}</div>
+    <div v-if="itemName" style="padding-bottom: 10px;padding-left:10px;font-size: 14px">
+      <p :title="itemName" style="width: 200px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;">
+        {{itemName}}
+      </p>
+    </div>
   </div>
 </template>
 <style>

+ 1 - 0
src/locale/lang/zh-CN.js

@@ -41,6 +41,7 @@ export default {
   WX_REGISTER_LIST: '商户管理',
   APPLY_RECORD_LIST: '审核管理',
   bus_resources_tools: '文件库',
+  file_manage: '文件管理',
   修改密码: '修改密码',
   动态数据: '动态数据',
   全屏: '全屏',

+ 33 - 4
src/router/routers.js

@@ -93,8 +93,8 @@ export default [
         },
         component: () => import('@/view/crops/sn_data_record')
         // component: () => import('@/view/crops/eloam_apply_record')
-      },
-      {
+      }
+      /* {
         path: 'APPLY_RECORD_LIST',
         name: 'APPLY_RECORD_LIST',
         meta: {
@@ -110,8 +110,37 @@ export default [
           notCache: true,
           title: '文件库'
         },
+        component: () => import('@/view/crops/eloam_apply_record')
+      } */
+    ]
+  },
+  {
+    path: '/file_manage',
+    name: 'file_manage',
+    component: Main,
+    meta: {
+      icon: 'md-folder',
+      title: '文件管理'
+    },
+    children: [
+      {
+        path: 'bus_resources_tools',
+        name: 'bus_resources_tools',
+        meta: {
+          notCache: true,
+          title: '文件库'
+        },
         // component: () => import('@/view/crops/sn_data_record')
         component: () => import('@/view/crops/eloam_apply_record')
+      },
+      {
+        path: 'APPLY_RECORD_LIST',
+        name: 'APPLY_RECORD_LIST',
+        meta: {
+          notCache: true,
+          title: '审核管理'
+        },
+        component: () => import('@/view/crops/apply_record_list')
       }
     ]
   },
@@ -144,7 +173,7 @@ export default [
       }
     ]
   },
-  {
+  /* {
     path: '/WX_FACE_ORDER',
     name: 'WX_FACE_ORDER',
     component: Main,
@@ -199,7 +228,7 @@ export default [
         component: () => import('@/view/crops/fad_merchant_register.vue')
       }
     ]
-  },
+  }, */
   {
     path: '/OTA_UPDATE_MANAGE',
     name: 'OTA_UPDATE_MANAGE',

+ 72 - 18
src/view/crops/apply_record_list.vue

@@ -3,9 +3,9 @@
     text-align: center;
   }
 
-  .ivu-steps-main .ivu-steps-content {
-    width: 200px;
-  }
+  /*.ivu-steps-main .ivu-steps-content {
+    width: 300px;
+  }*/
 </style>
 <template>
   <Card dis-hover>
@@ -54,7 +54,7 @@
       </Col>
     </Row>
     <Row style="padding-top: 20px">
-      <Button @click="authorizationConfigurationAction" type="primary">授权配置</Button>
+      <Button @click="authorizationConfigurationAction" v-has="'AUTH_CONF_APPLY'" type="primary">授权配置</Button>
     </Row>
     <Row style="padding-top: 20px">
       <Table :loading="loading" :columns="columns" :data="tableData" :row-class-name="cellStyle"></Table>
@@ -98,7 +98,7 @@
           <Button type="primary" @click="agreeAuthConf" style="margin-left: 40px">确定</Button>
         </div>
       </Modal>
-      <Modal :title="detailForm.status" v-model="applyDetailsModal" :mask-closable="false" :closable="false">
+      <Modal :title="detailForm.status" v-model="applyDetailsModal" :mask-closable="false" :closable="true">
         <!--toSearchApplyName-->
         <!--  <Select style="width: 70%" v-model="searchApplyId" clearable filterable @on-open-change="openSelectApplyName" @on-query-change="toSearchApplyName">
             <Option v-for="(item,index) in searchApplyList" :value="item.id" :key="index">{{item.nickName}}-{{item.loginName}}</Option>
@@ -133,13 +133,14 @@
         </div>
         <div slot="footer" style="text-align:center">
           <!--这里需要处理数据-->
-          <div v-if="!detailForm.toExamineStatus">
+          <Button type="primary" icon="md-close" @click="applyRecordDetailsCancel">关闭</Button>
+         <!-- <div v-if="!detailForm.toExamineStatus">
             <Button type="dashed" @click="refuseApplyRecord">拒绝</Button>
             <Button type="primary" @click="agreeApplyRecord" style="margin-left: 40px">同意</Button>
           </div>
           <div v-else>
             <Button type="primary" icon="md-close" @click="applyRecordDetailsCancel">关闭</Button>
-          </div>
+          </div>-->
         </div>
       </Modal>
       <Modal title="审核授权申请" v-model="updateStepsStatusModal" :mask-closable="false" :closable="true">
@@ -151,6 +152,7 @@
           <Button type="dashed" @click="refuseApplyRecord">拒绝</Button>
           <Button type="primary" @click="agreeApplyRecord" style="margin-left: 40px">同意</Button>
         </div>
+        <Spin fix v-if="toExamineLoadingStatus && updateStepsStatusModal"></Spin>
       </Modal>
     </Row>
   </Card>
@@ -188,8 +190,8 @@ export default {
           align: 'center',
           minWidth: 150,
           render: (h, params) => {
-            let status = params.row.status
-            return h('span', status === 1 ? '已通过' : (status === -1 ? '已拒绝' : '待审核'))
+            let status = params.row.applyStatus
+            return h('span', status === 1 ? '已通过' : (status === -1 ? '已拒绝' : (status === -2 ? '已失效' : '待审核')))
           }
         },
         {
@@ -203,6 +205,36 @@ export default {
           }
         },
         {
+          title: '申请理由',
+          key: 'applyReason',
+          align: 'center',
+          width: 240,
+          render: (h, params) => {
+            const errorDescr = params.row.applyReason
+            return h(
+              'p',
+              {
+                style: {
+                  width: '200px',
+                  overflow: 'hidden',
+                  'white-space': 'nowrap',
+                  'text-overflow': 'ellipsis',
+                  cursor: 'pointer'
+                },
+                attrs: {
+                  title: errorDescr
+                },
+                on: {
+                  click: () => {
+                    this.clipErrorInfo(errorDescr)
+                  }
+                }
+              },
+              errorDescr
+            )
+          }
+        },
+        {
           title: '操作',
           key: 'action',
           minWidth: 100,
@@ -262,7 +294,7 @@ export default {
                       type: 'default',
                       size: 'small',
                       icon: 'ios-radio-button-on',
-                      disabled: type === 0 || status !== 0
+                      disabled: type === 0 || status !== 0 || data.handle !== 1
                     },
                     style: {
                       marginLeft: '15px'
@@ -309,8 +341,9 @@ export default {
       },
       statusList: [
         { value: 0, label: '待审核' },
-        { value: 1, label: '已拒绝' },
-        { value: 2, label: '已通过' }
+        { value: -1, label: '已拒绝' },
+        { value: 1, label: '已通过' },
+        { value: -2, label: '已失效' }
       ],
       stepsCurrent: 0,
       stepsList: [],
@@ -323,6 +356,7 @@ export default {
       searchApplyList: [],
       searchApplyIndex: '',
       refuseModal: false,
+      toExamineLoadingStatus: false,
       authConfModal: false,
       refuseReason: '',
       authConfList: [{
@@ -484,19 +518,17 @@ export default {
       this.refuseReason = ''
       this.refuseModal = false
       this.updateStepsStatusModal = false
-      this.applyDetailsModal = false
+      // this.applyDetailsModal = false
     },
     agreeRefuseHandle () {
       if (this.refuseReason) {
-        this.refuseModal = false
         this.doApplyRecord(-1)
       } else {
         this.$Message.error('拒绝需要理由哟~')
       }
-      this.refuseReason = ''
     },
     myCardTest (val) {
-      console.log(val)
+      // console.log(val)
     },
     authorizationConfigurationAction () {
       // 授权配置
@@ -520,7 +552,6 @@ export default {
           nickName: item.nickName + '--' + item.loginName
         })
         this.$set(this.authConfList, 'children', children)
-        console.log(this.authConfList)
         // 清理数据
         this.searchApplyIndex = ''
         this.searchApplyList = []
@@ -531,7 +562,14 @@ export default {
         // 这里准备查询数据
         this.requestMethod({ method: 'get', URI: '/apply/findApplyListByName?nickName=' + val }).then(res => {
           if (res.code === 0) {
-            this.searchApplyList = res.data
+            // 这里还有去掉已经选择的数据
+            let children = this.authConfList[0].children || []
+            let anies = children.map(item => item.id)
+            this.searchApplyList = res.data.filter(item => {
+              if (anies.indexOf(item.id) === -1) {
+                return item
+              }
+            })
           } else {
             this.$Message.error(res.msg)
           }
@@ -565,6 +603,7 @@ export default {
     },
     doApplyRecord (status) {
       if (this.updateStepsId) {
+        this.toExamineLoadingStatus = true
         this.requestMethod({
           method: 'post',
           URI: `/apply/handleApplyRecord/${this.updateStepsId}/${status}?refuseReason=` + this.refuseReason
@@ -576,9 +615,15 @@ export default {
             this.$Message.error(res.msg)
           }
           this.updateStepsStatusModal = false
+          this.refuseModal = false
+          this.refuseReason = ''
+          this.toExamineLoadingStatus = false
         })
       } else {
         this.updateStepsStatusModal = false
+        this.refuseModal = false
+        this.refuseReason = ''
+        this.toExamineLoadingStatus = false
       }
       this.applyDetailsModal = false
     },
@@ -707,6 +752,15 @@ export default {
         .catch(() => {
           this.loading = false
         })
+    },
+    // 复制异常信息
+    clipErrorInfo (errorDescr) {
+      // clipboard(errorDescr, event)
+      const errorInfoInputNode = this.$refs.errorInfoInput
+      errorInfoInputNode.value = errorDescr
+      errorInfoInputNode.select()
+      document.execCommand('copy')
+      this.$Message.success('复制成功')
     }
   }
 }

+ 6 - 2
src/view/crops/eloam_apply_record.vue

@@ -46,6 +46,7 @@
           <Button type="dashed" @click="cancelRefuseHandle">取消</Button>
           <Button type="primary" @click="agreeRefuseHandle" style="margin-left: 40px">确定</Button>
         </div>
+        <Spin fix v-if="applyLoading && applyModal"></Spin>
       </Modal>
     </Row>
     <Row style="padding-top: 20px;text-align: center">
@@ -93,6 +94,7 @@ export default {
         productModel: '',
         productType: ''
       },
+      applyLoading: false,
       applyModal: false,
       applyFileName: '',
       applyReason: '',
@@ -114,6 +116,7 @@ export default {
     agreeRefuseHandle () {
       // 发起申请
       if (this.applyReason) {
+        this.applyLoading = true
         // 下面处理数据
         this.requestMethod({ method: 'post', URI: `/apply/applyResources/${this.applyItemId}?applyReason=` + this.applyReason }).then(res => {
           if (res.code === 0) {
@@ -121,9 +124,10 @@ export default {
           } else {
             this.$Message.error(res.msg)
           }
+          this.applyLoading = false
+          this.applyModal = false
+          this.applyReason = ''
         })
-        this.applyModal = false
-        this.applyReason = ''
       } else {
         this.$Message.error('申请需要理由哟~')
       }

+ 1 - 1
vue.config.js

@@ -67,6 +67,6 @@ module.exports = {
   // 这里写你调用接口的基础路径,来解决跨域,如果设置了代理,那你本地开发环境的axios的baseUrl要写为 '' ,即空字符串
   devServer: {
     // proxy: 'https://sac.eloam.net/api/'
-    proxy: 'http://localhost:8888'
+    proxy: 'http://localhost:8889'
   }
 }