浏览代码

修复小bug

shaogen1995 4 年之前
父节点
当前提交
7714af4a8b
共有 3 个文件被更改,包括 20 次插入34 次删除
  1. 2 2
      src/views/holding/holding3_DiaEdit.vue
  2. 16 30
      src/views/holding/holding4.vue
  3. 2 2
      src/views/holding/holding4_look.vue

+ 2 - 2
src/views/holding/holding3_DiaEdit.vue

@@ -299,7 +299,7 @@
 import axios from '@/utils/request'
 import { getHolding3Edit } from '../../apis/holding3'
 import {
-  holdingAdd,
+  // holdingAdd,
   getGoodsNumType,
   getGoodsType,
   detailsById,
@@ -483,7 +483,7 @@ export default {
         // const c = myDate.getDate()
         // console.log(999, a, b + 1, c)
         this.tableData.push({ name: file.data.fileName, updateTime: file.timestamp.slice(0, 10), filePath: file.data.filePath, type: this.affixVal })
-        await holdingAdd(this.ruleForm)
+        // await holdingAdd(this.ruleForm)
       }
     },
     handleRemove (file) {

+ 16 - 30
src/views/holding/holding4.vue

@@ -18,13 +18,12 @@
             <li :class="{active:stateInd===index}" @click="stateSelect(index)" v-for="(item,index) in stateArr" :key="index">{{item.txt}}({{item.num}})</li>
           </ul>
           <div class="select">
-            <span>藏品名称:</span>
-            <el-input
-              v-model="myData.name"
-              placeholder="请输入"
-              style="width: 217px"
-            ></el-input>
-            <span>登记人:</span>
+            <span>搜索:</span>
+                <el-select v-model="myData.type" placeholder="请选择" style="width:108px">
+                  <el-option label="藏品名称" value="name"></el-option>
+                  <el-option label="登记人" value="user"></el-option>
+                </el-select>
+
             <el-input
               v-model="myData.searchKey"
               placeholder="请输入"
@@ -62,8 +61,8 @@
               <el-table-column label="操作" width="295">
                 <template #default='{row}'>
                   <el-button type="text"  @click="myLook(row)" v-if="row.status!=='待审核'">查看</el-button>
-                  <el-button type="text"  @click="audit(row)" v-if="row.status==='待审核'">审核</el-button>
-                  <el-button type="text"  @click="delData(row.id,row.status)" v-if="row.status!=='已完成'">删除</el-button>
+                  <el-button type="text"  @click="audit(row)" v-if="row.status==='待审核'" v-show="userLogo.audit">审核</el-button>
+                  <el-button type="text"  @click="delData(row.id,row.status)" v-if="row.status!=='已完成'" v-show="userLogo.del">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -94,13 +93,12 @@ export default {
   data () {
     return {
       userLogo: {
-        add: true, // 申请
-        edit: true, // 编辑
-        audit: true, // 审核
-        del: true// 删除
+        audit: false, // 审核
+        del: false// 删除
       },
       total: 0,
       myData: {
+        type: 'name',
         name: '',
         endTime: '', // 结束时间
         pageNum: 1, // 起始页码,默认1为第一页
@@ -297,23 +295,11 @@ export default {
     temp = JSON.parse(temp)
     if (temp) {
       const temp2 = temp.role[0]
-      if (temp2 === 'sys_audit') this.userLogo.del = false // 保管部主任
-      if (temp2 === 'sys_edit') {
-        this.userLogo.del = false
-        this.userLogo.audit = false
-      } // 保管部成员
-      if (temp2 === 'sys_look') {
-        this.userLogo.del = false
-        this.userLogo.audit = false
-        this.userLogo.add = false
-        this.userLogo.edit = false
-      } // 其他部门人员
-      if (temp2 === 'sys_collect') {
-        this.userLogo.del = false
-        this.userLogo.audit = false
-        this.userLogo.add = false
-        this.userLogo.edit = false
-      } // 征集部主任
+      if (temp2 === 'sys_admin') {
+        this.userLogo.audit = true
+        this.userLogo.del = true
+      } // 超管
+      if (temp2 === 'sys_audit') this.userLogo.audit = true // 保管部主任
     }
   },
   beforeCreate () {}, // 生命周期 - 创建之前

+ 2 - 2
src/views/holding/holding4_look.vue

@@ -40,8 +40,8 @@
           <div class="father">
           <div class="con_txt" v-for="(item,index) in editData" :key="index">
             <div style="width:200px">{{item.name}}</div>
-            <div style="width:650px">{{item.qian}}</div>
-            <div style="flex: 1;">{{item.hou}}</div>
+            <div style="width:650px">{{item.qian?item.qian:'-'}}</div>
+            <div style="flex: 1;">{{item.hou?item.hou:'-'}}</div>
           </div>
           </div>
         </div>