فهرست منبع

更新 approve-item.js

xutongzee 1 سال پیش
والد
کامیت
04cb8c2519

+ 21 - 24
TODO.md

@@ -1,20 +1,5 @@
 # 钉钉办公系统 - 待办事项
 
-## 前端 TODO
-
-- [x] 上传文件/图片等模块
-- [x] 下载文件通过链接下载 (等待测试)
-- [x] 商品规格页面
-- [x] 抄送人超过三个时显示状态需要更新
-- [x] 商品单价页面
-- [ ] 路由标题配置。 通过 dingtalk Set title
-- [ ] 我的出差-详情页面缺少 发起人字段
-- [ ] 我的出差-同行人员需要机器测试
-
-### 缺少明细的页面
-
-- 入库 3
-
 ## Uiiiiii lack todo
 
 - [ ] 个人中心`tag`Icons 需要补充
@@ -23,28 +8,40 @@
 - [ ] 审批详情 底部的 各种功能 ICONS 需要设计师给予
 - [ ] 审批详情 顶部 ICON 需要 设计切图
 
-## RearEnd Bugs
+## 前端 TODO
 
+- [ ] 路由标题配置。 通过 dingtalk Set title
+- [x] 我的出差-详情页面缺少 发起人字段
+- [ ] 我的出差-同行人员需要机器测试
 - [ ] 商品库搜索商品接口
 
---- 2023/12/18 ---
+## RearEnd Bugs And Todo
 
-- [ ] 申请人数据渲染时。 缺少中文对应的字段展示
+--- 2023/12/18 ---
 
 # 今日完成
 
-- [x] 领用明细不需要价格 UI
-- [x] 领用申请成功提交 (添加导入,商品库选择等)
-- [ ] 完成各个模块的文件,图片 Format Data
+- [x] 申请人中文名称渲染
+- [x] 呈批申请
+  - [x] 提交申请完成
+  - [x] 详情渲染完成
+- [x] 各模块提交后渲染字段
 
 ## 流程
 
-- [ ] 申购申请 module = 1
+- [ ] 呈批申请 module = 2
+
+  - [x] 提交申请完成
+  - [x] 详情渲染完成
+
+- [ ] 入库申请, module = 3
 - [x] 领用申请 module = 4 提价申请完成
   - [ ] 明细报错
-- [x] 出差申请 module = 5
-- [x] 维修流程 module = 8
+- [ ] 请假申请 module = 6
+- [ ] 用车申请 module = 7
 - [ ] 合同呈批 module = 9
+- [ ] 收文批阅 module = 10
+- [ ] 学校文件 module = 11
 
 - [ ] 申请人 用车
 - [ ] 申请人 请假

+ 11 - 1
src/store/modules/enum.js

@@ -46,7 +46,7 @@ const state = {
  * @returns {string}
  */
 function getKeyToTxt(arrs, id) {
-    let target = arrs.filter(row => row.id === id)
+    let target = arrs.filter(row => row.id == id)
     if (!target.length) return 'UNKNOW'
     return target[0].name
 }
@@ -65,6 +65,16 @@ const getters = {
     getMaintainText: state => id => getKeyToTxt(state.maintainTypeList, id),
     getPayTypeText: state => id => getKeyToTxt(state.applyPayTypeList, id),
     getapplyTypeText: state => id => getKeyToTxt(state.applyTypeList, id),
+    // 呈批类型
+    getOfferTypeList: state => id => getKeyToTxt(state.offerTypeList, id),
+    // 出差列表
+    getEvectionTypeList: state => id => getKeyToTxt(state.evectionTypeList, id),
+
+    // 获取出差
+    getLeaveTypeTypeList: state => id => getKeyToTxt(state.leaveTypeList, id),
+    // 获取合同
+    getContractTypeList: state => id => getKeyToTxt(state.contractTypeList, id)
+
 }
 
 const mutations = {

+ 2 - 2
src/store/modules/user.js

@@ -13,10 +13,10 @@ const state = {
     signatureStateText: '',  // 个签
 
     // 徐同泽
-    // token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIxOSIsImlzcyI6Imh0dHBzOlwvXC96YWluLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC96YWluLmNvbSIsImlhdCI6MTcwMjY5NzQ0NCwibmJmIjoxNzAyNjk3NDQ0LCJleHAiOjE3Mjg2MTc0NDR9.BOU8yu57KZrgUbcIGuS0a8AB91oLhH6nHawxYUQwt7U',
+    token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIxOSIsImlzcyI6Imh0dHBzOlwvXC96YWluLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC96YWluLmNvbSIsImlhdCI6MTcwMjY5NzQ0NCwibmJmIjoxNzAyNjk3NDQ0LCJleHAiOjE3Mjg2MTc0NDR9.BOU8yu57KZrgUbcIGuS0a8AB91oLhH6nHawxYUQwt7U',
 
     // 张鑫楷
-    token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIyMSIsImlzcyI6Imh0dHBzOlwvXC96YWluLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC96YWluLmNvbSIsImlhdCI6MTcwMjY5NzQ5MiwibmJmIjoxNzAyNjk3NDkyLCJleHAiOjE3Mjg2MTc0OTJ9.tvPS5OIrfn21LItFuUSiKgnAUu1p-9x5xwzVzxp6y20'
+    // token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIyMSIsImlzcyI6Imh0dHBzOlwvXC96YWluLmNvbSIsImF1ZCI6Imh0dHBzOlwvXC96YWluLmNvbSIsImlhdCI6MTcwMjY5NzQ5MiwibmJmIjoxNzAyNjk3NDkyLCJleHAiOjE3Mjg2MTc0OTJ9.tvPS5OIrfn21LItFuUSiKgnAUu1p-9x5xwzVzxp6y20'
 }
 
 const getters = {

+ 512 - 16
src/utils/applyfor-item.js

@@ -3,14 +3,18 @@
  */
 
 import store from "@/store"
-// const degree2Txt = store.getters['enum/getDegreeText']
+const degree2Txt = store.getters['enum/getDegreeText']
 const maintainTypeList = store.getters['enum/getMaintainText']
 
 const getPayTypeText = store.getters["enum/getPayTypeText"]
 const getapplyTypeText = store.getters["enum/getapplyTypeText"]
+const getOfferTypeList = store.getters["enum/getOfferTypeList"]
+const getEvectionTypeList = store.getters["enum/getEvectionTypeList"]
+const getLeaveTypeTypeList = store.getters["enum/getLeaveTypeTypeList"]
+const getContractTypeList = store.getters["enum/getContractTypeList"]
 
-
-function getModule1(data){
+// 申购审批详情
+function getModule1(data){ /* eslint-disable-line */
   const { order_no, department_data, create_at, module_info, apply_user } = data
   return [
     {
@@ -49,10 +53,13 @@ function getModule1(data){
       title: '预计申购完成日期',
       value: module_info.apply_date
     },
-    {
+    module_info.document_text.length ? {
+      type: 'files',
       title: '附件材料',
-      value: "@TODO"
-    },
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
     module_info.images_text.length ? {
       type: 'images',
       title: '图片',
@@ -67,7 +74,320 @@ function getModule1(data){
   ]
 }
 
-function getModule8(data) {
+// 呈批申请
+function getModule2(data){ /* eslint-disable-line */
+  const { order_no, department_data, create_at, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    {
+      title: '呈批类型',
+      value: getOfferTypeList(data.type)
+    },
+    {
+      title: '发文字号',
+      value: `${module_info.word_size}`
+    },
+    {
+      title: '缓急程度',
+      value: degree2Txt(module_info.desc)
+    },
+    {
+      title: '印制份数',
+      value: `${module_info.number}`
+    },
+    {
+      title: '申请标题',
+      value: module_info.reason
+    },
+    {
+      title: '申请内容',
+      value: module_info.remark
+    },
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+  ]
+}
+
+// 入库申请
+function getModule3(data) { /* eslint-disable-line */
+  const { order_no, department_data, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: data.create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    // TODO: 物品明细
+    // 物品明细
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+    module_info.images_text.length ? {
+      type: 'images',
+      title: '图片',
+      value: module_info.images_text.map(img => ({
+        url: img
+      }))
+    } : undefined,
+    {
+      title: '其他补充说明',
+      value: module_info.remark
+    }
+  ]
+}
+
+// 领用申请
+function getModule4(data) { /* eslint-disable-line */
+  const { order_no, department_data, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: data.create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    // TODO: 物品明细
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+    {
+      title: '其他补充说明',
+      value: module_info.remark
+    }
+  ]
+}
+
+// 出差申请
+function getModule5(data) { /* eslint-disable-line */
+  const { order_no, department_data, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: data.create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    {
+      title: '出差事由',
+      value: module_info.reason
+    },
+    {
+      title: '同行人员',
+      value: Array.isArray(data.peer_user) && data.peer_user.length ? data.peer_user.map(user => (user.name)).join('、') : '暂无同行人员'
+    },
+    {
+      title: '出差开始时间',
+      value: module_info.start_time
+    },
+    {
+      title: '出差结束时间',
+      value: module_info.end_time
+    },
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+    module_info.images_text.length ? {
+      type: 'images',
+      title: '图片',
+      value: module_info.images_text.map(img => ({
+        url: img
+      }))
+    } : undefined,
+    {
+      title: '出差类型',
+      value: getEvectionTypeList(module_info.type)
+    },
+    // NOTE: type === 1 show that.
+    module_info.type == 1 ? {
+      title: '是否跨关内关外',
+      value: module_info.is_who == 0 ? '否' : '是'
+    } : undefined
+  ]
+}
+
+// 请假申请
+function getModule6(data) { /* eslint-disable-line */
+  const { order_no, department_data, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: data.create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    {
+      title: '请假类型',
+      value: getLeaveTypeTypeList(module_info.type)
+    },
+    {
+      title: '请假开始时间',
+      value: apply_user.start_time
+    },
+    {
+      title: '请假结束时间',
+      value: apply_user.end_time
+    },
+    {
+      title: '请假时长',
+      value: apply_user.time
+    },
+    {
+      title: '原因',
+      value: apply_user.reason
+    },
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+    module_info.images_text.length ? {
+      type: 'images',
+      title: '图片',
+      value: module_info.images_text.map(img => ({
+        url: img
+      }))
+    } : undefined,
+    {
+      title: '是否离“深”',
+      value: apply_user.remark
+    }
+  ]
+}
+
+// 用车申请
+function getModule7(data) { /* eslint-disable-line */
+  const { order_no, department_data, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: data.create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    {
+      title: '出发地点',
+      value: apply_user.reason
+    },
+    {
+      title: '出发时间',
+      value: apply_user.start_time
+    },
+    {
+      title: '到达地点',
+      value: apply_user.end_address
+    },
+    {
+      title: '返回时间',
+      value: apply_user.name
+    },
+    {
+      title: '返回地点',
+      value: apply_user.name
+    },
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+    module_info.images_text.length ? {
+      type: 'images',
+      title: '图片',
+      value: module_info.images_text.map(img => ({
+        url: img
+      }))
+    } : undefined,
+  ]
+}
+
+// 维修申请
+function getModule8(data) { /* eslint-disable-line */
   const { order_no, department_data, module_info} = data
   return [
     {
@@ -105,20 +425,196 @@ function getModule8(data) {
   ]
 }
 
+// 合同呈批
+function getModule9(data) { /* eslint-disable-line */
+  const { order_no, department_data, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: data.create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    {
+      title: '合同类型',
+      value: getContractTypeList(module_info.type)
+    },
+    {
+      title: '合同编号',
+      value: `${apply_user.reason}`
+    },
+    {
+      title: '缓急程度',
+      value: degree2Txt(module_info.desc)
+    },
+    {
+      title: '印制份数',
+      value: `${apply_user.number}`
+    },
+    {
+      title: '发放范围',
+      value: `${apply_user.scope}`
+    },
+    {
+      title: '法务意见',
+      value: `${apply_user.legal_opinion}`
+    },
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+    {
+      title: '备注',
+      value: module_info.remark
+    }
+  ]
+}
+
+// 收文批阅
+function getModule10(data) { /* eslint-disable-line */
+  const { order_no, department_data, create_at, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    // 
+    {
+      title: '创建人',
+      value: apply_user.name
+    },
+    // 
+    {
+      title: '发起人',
+      value: apply_user.name
+    },
+    {
+      title: '来文单位名称',
+      value: apply_user.desc
+    },
+    {
+      title: '收文序号',
+      value: apply_user.serial_number
+    },
+    {
+      title: '文件名称',
+      value: apply_user.reason
+    },
+    {
+      title: '收文日期',
+      value: apply_user.apply_date
+    },
+    {
+      title: '内容摘要',
+      value: apply_user.remark
+    },
+    {
+      title: '缓急程度',
+      value: degree2Txt(module_info.desc)
+    },
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+  ]
+}
+
+// 学校文件  
+function getModule11(data) { /* eslint-disable-line */
+  const { order_no, department_data, module_info, apply_user } = data
+  return [
+    {
+      title: '审批编号',
+      value: order_no
+    },
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
+      title: '申请日期',
+      value: data.create_at
+    },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    // TODO:
+    {
+      title: '拟稿部门',
+      value: apply_user.name
+    },
+    {
+      title: '文件名称',
+      value: apply_user.reason
+    },
+    // TODO:
+    {
+      title: '落款',
+      value: apply_user.name
+    },
+    {
+      title: '上会情况',
+      value: apply_user.remark
+    },
+    module_info.document_text.length ? {
+      type: 'files',
+      title: '附件材料',
+      value: module_info.document_text.map(doc => ({
+        url: doc
+      }))
+    } : undefined,
+    {
+      title: '缓急程度',
+      value: degree2Txt(module_info.desc)
+    },
+    {
+      title: '拟发文时间',
+      value: apply_user.apply_date
+    },
+    {
+      title: '文件号',
+      value: apply_user.serial_number
+    },
+  ]
+}
+
 export const formatApplyforRows = (data) => {
   let type = data.module
   if (typeof type !== 'number') type = Number(type)
   let arrs = []
+  if (![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(type)) return []
+  const moduleFunc = `getModule${type}`
 
-  switch (type) {
-    case 1:
-      arrs = getModule1(data)
-      break
-    case 8:
-      arrs = getModule8(data)
-      break
-  }
-  
+  arrs = moduleFunc(data)
   // NOTE: 过滤为undefined字段
   return arrs.filter(item => (item))
 }

+ 2 - 1
src/utils/approve-item.js

@@ -6,6 +6,7 @@ import store from "@/store"
 
 const degree2Txt = store.getters['enum/getDegreeText']
 const getapplyTypeText = store.getters["enum/getapplyTypeText"]
+const getOfferTypeList = store.getters["enum/getOfferTypeList"]
 
 export function formatApproveItemRow(data, type) {
     if (typeof type !== 'number') type = Number(type)
@@ -34,7 +35,7 @@ export function formatApproveItemRow(data, type) {
         case 2:
             arrs = [
                 { label: '申请标题', val: data.reason },
-                { label: '呈批类型', val: data.type },
+                { label: '呈批类型', val: getOfferTypeList(data.type) },
                 { label: '缓急程度', val: degree2Txt(data.desc) }
             ]
             break

+ 26 - 4
src/views/My.vue

@@ -1,12 +1,18 @@
 <template>
     <div class="personnel-center">
         <div class="setting">
+            <!-- TODO: title right btn -->
             <span @click="handleGoSetting">设置</span>
         </div>
         <!-- 个人信息 -->
         <div class="info" @click="handleGoUserInfo">
             <div class="p__avatar" v-if="userinfo">
-                <img :src="userinfo.avatar" :alt="userinfo.name">
+                <template v-if="userinfo.avatar">
+                    <img :src="userinfo.avatar" :alt="userinfo.name">
+                </template>
+                <template v-else>
+                    <span class="name">{{ userinfo.name | changeName }}</span>
+                </template>
             </div>
             <div class="p__infobox">
                 <div class="p__name">{{ username }}</div>
@@ -47,6 +53,8 @@ import { getUserApproveCount } from '@/api/approve'
 
 import { mapState, mapGetters } from 'vuex'
 
+// import { changeName } from '@utils/filter'
+
 export default {
     name: 'My',
     computed: {
@@ -158,7 +166,10 @@ export default {
                 name: 'Userinfo'
             })
         },
-    }
+    },
+    // filters: {
+    //     changeName
+    // }
 }
 </script>
 
@@ -199,17 +210,28 @@ export default {
 
 .p {
     &__avatar {
+        font-size: 0;
         width: 56px;
         height: 57px;
-        width: 56px;
-        border-radius: 8px;
+        line-height: 57px;
+        // border-radius: 8px;
         overflow: hidden;
         margin-right: 15px;
+        text-align: center;
+        background-color: @main-color;
+        vertical-align: middle;
+        border-radius: 6px;
 
         img {
             width: 100%;
             height: 100%;
         }
+
+        span.name {
+            vertical-align: middle;
+            font-size: 16px;
+            color: #fff;
+        }
     }
 
     &__infobox {

+ 1 - 0
src/views/apply-state/index.vue

@@ -167,6 +167,7 @@ export default {
             try {
                 let THAT = this
                 const params = {
+                    group: 'list',
                     module: this.formType,
                     status: Number(this.tabVal),
                     ...this.pagination

+ 2 - 1
src/views/applyfor/index.vue

@@ -81,6 +81,7 @@ import IndexType11 from './components/IndexType11.vue';
 
 // Api
 import * as approveInfoApi from '@/api/approveinfo'
+
 import * as approveApi from '@/api/approve'
 
 import store from '@/store';
@@ -121,8 +122,8 @@ export default {
         IndexType9,
         IndexType10,
         IndexType11,
-        // bizCont
     },
+
     computed: {
         // 获取需要渲染的组件
         renderComponent() {

+ 1 - 7
src/views/applyfor/indexMixins.js

@@ -46,13 +46,7 @@ export default {
                 const res = await getApproveFlowPath(params)
 
                 if (res.code === 1) {
-                    /*
-                    [{
-                        userid: string,
-                        avatar: string,
-                        name: string
-                    }]
-                     */
+                    /* { userid: string, avatar: string, name: string }[] */
                     const { 
                         approve_user = [],
                         copy_user = [],

+ 13 - 9
src/views/approve/components/ApproveFlowPath.vue

@@ -5,7 +5,8 @@
         </div>
         <div class="flow-path-main">
             <!-- 发起人 -->
-            <div class="row flex flex-row" v-if="create">
+            <!-- NOTE: Useless -->
+            <!-- <div class="row flex flex-row" v-if="create">
                 <div class="row__line"></div>
                 <div class="avatar avatar--name">
                     <template v-if="create.avatar">
@@ -26,10 +27,10 @@
                         </div>
                     </div>
                 </div>
-            </div>
+            </div> -->
 
             <!-- 审批人 -->
-            <div class="row flex flex-row" v-for="(person, idx) in approveList" :key="idx">
+            <div class="row flex flex-row" v-for="(person, idx) in  approveList " :key="idx">
                 <div class="row__line"></div>
                 <div class="avatar avatar--name">
                     <template v-if="person.user.avatar">
@@ -44,13 +45,14 @@
                 </div>
                 <div class="row-main">
                     <div class="header flex flex-row flex-row-aic">
-                        <span class="header__title">审批人</span>
-                        <span class="header__time">{{ person.approve_time }}</span>
+                        <span class="header__title">{{ person.group === 1 ? '申请人' : '审批人' }}</span>
+                        <span class="header__time" v-if="person.approve_time">{{ person.approve_time }}</span>
                     </div>
                     <div class="mainbox flex flex-row flex-row-aic">
-                        <div class="mainbox__cur-name">
-                            {{ person.user.name }}(<span :class="handleMapClass(person.status)">{{ person.status |
-                                filterFlowPathStatusTxt }}</span>)
+                        <div class="mainbox__cur-name">{{ person.user.name }}<template v-if="person.group !== 1">(<span
+                                    :class="handleMapClass(person.status)">{{ person.status |
+                                        filterFlowPathStatusTxt }}</span>)
+                            </template>
                         </div>
                         <div class="mainbox__cur-use-time" v-if="person.time_text">
                             平均审批时长:{{ person.time_text }}
@@ -89,7 +91,8 @@
                     </div>
                     <div class="footerinfo footerinfo--ptop10">
                         <div v-show="seeMoreCopy" class="recive-of flex flex-row flex-row-aic">
-                            <div class="personal flex flex-col flex-col-aic" v-for="(personal, idx) in copys" :key="idx">
+                            <div class="personal flex flex-col flex-col-aic" v-for="( personal, idx ) in  copys "
+                                :key="idx">
                                 <div class="avatar avatar--name">
                                     <span class="avatar__name">{{ personal.user.name | changeName }}</span>
                                     <div class="status-bar" v-if="false">
@@ -234,6 +237,7 @@ export default {
             bottom: 0;
             width: 14px;
             height: 14px;
+            font-size: 0;
             text-align: center;
             line-height: 14px;
             background: @white;

+ 34 - 43
src/views/approve/search.vue

@@ -2,41 +2,20 @@
     <!-- 搜索页面 -->
     <div class="search-container flex flex-col">
         <div class="filter-container p-h-12 flex flex-row flex-row-aic">
-            <van-field
-                v-model.trim="searchVal"
-                clearable
-                :placeholder="inputPlaceholderText"
-                left-icon="search"
-                @input="handleInputEvent"
-            />
+            <van-field v-model.trim="searchVal" clearable :placeholder="inputPlaceholderText" left-icon="search"
+                @input="handleInputEvent" />
             <div class="filterbox flex flex-row flex-0shrink">
                 <span @click="handleStartSearch">搜索</span>
             </div>
         </div>
         <div class="search-main">
-            <van-list
-                v-model="listLoading"
-                :finished="finished"
-                :finished-text="finishedText"
-                @load="onLoadData"
-                :immediate-check="false"
-            >
-                <approve-item
-                    v-for="(item, idx) in tableData"
-                    :key="idx"
-                    approve-type="xx"
-                    :title="item.__title__"
-                    :time="item.apply_date"
-                    :rows="item.__rows_item__"
-                    :person="item.approve_one.user.name"
-                    :flag="flag"
-                    :flag-state="flagState"
-                />
+            <van-list v-model="listLoading" :finished="finished" :finished-text="finishedText" @load="onLoadData"
+                :immediate-check="false">
+                <approve-item v-for="(item, idx) in tableData" :key="idx" approve-type="xx" :title="item.__title__"
+                    :time="item.apply_date" :rows="item.__rows_item__" :person="item.approve_one.user.name" :flag="flag"
+                    :flag-state="flagState" />
             </van-list>
-            <my-empty
-                v-show="showEmpty"
-                tip="暂无数据"
-            />
+            <my-empty v-show="showEmpty" tip="暂无数据" />
         </div>
     </div>
 </template>
@@ -46,7 +25,7 @@ import throttle from 'lodash/throttle'
 
 import ApproveItem from '@/views/approve/components/ApproveItem.vue'
 
-import { getRecordList } from '@/api/approveinfo' 
+import { getRecordList } from '@/api/approveinfo'
 import { getApproveList } from '@/api/approve'
 import { formatApproveItemRow } from '@/utils/approve-item'
 
@@ -60,18 +39,18 @@ export default {
     computed: {
         // TODO: 缺少相对应的文案
         // NOTE: 输入框的placeholder
-        inputPlaceholderText () {
+        inputPlaceholderText() {
             let placeholder = '请输入申请内容、关键词'
             let ft = Number(this.formType)
-            switch(ft) {
+            switch (ft) {
                 case 5:
                     placeholder = '请输入申请内容、编号'
-                break
+                    break
             }
-            return  placeholder
+            return placeholder
         }
     },
-    data () {
+    data() {
         return {
             formType: '',
             flag: '',
@@ -91,13 +70,13 @@ export default {
         }
     },
 
-    created () {
+    created() {
         console.log('quers', this.$route.query);
         this.init()
     },
 
     methods: {
-        init () {
+        init() {
             const { formType, flag, flagState } = this.$route.query
             this.formType = Number(formType)
             this.flagState = Number(flagState)
@@ -118,7 +97,7 @@ export default {
             this.__getlist__()
         }, 400),
 
-        handleStartSearch () {
+        handleStartSearch() {
             this.tableData = []
             this.listLoading = true
             this.pagination.page = 1
@@ -128,7 +107,7 @@ export default {
             this.__getlist__()
         },
 
-        onLoadData () {
+        onLoadData() {
             // NOTE: 判断刚进入页面不加载
             this.__getlist__()
         },
@@ -137,17 +116,24 @@ export default {
         getParams() {
             const { page, page_num } = this.pagination
             const search = this.searchVal
-            return {
+
+            const params = {
                 page,
                 page_num,
                 search,
                 module: this.formType,
                 status: this.flagState,
             }
+
+            if (this.flag === 'info') {
+                params.group = 'list'
+            }
+
+            return params
         },
 
         // NOTE: 获取列表
-        async __getlist__ () {
+        async __getlist__() {
             try {
                 const params = this.getParams()
                 const res = await this.apifunc(params)
@@ -171,7 +157,7 @@ export default {
                         this.showEmpty = true
                     }
                 }
-            } catch(e) {
+            } catch (e) {
                 console.log('getlist-error', e);
             }
 
@@ -182,14 +168,17 @@ export default {
 
 <style lang="less" scoped>
 @import url("@/styles/variables.less");
+
 .search {
     &-container {
         height: 100%;
+
         .filter-container {
             padding-top: 7px;
             padding-bottom: 7px;
             box-sizing: border-box;
             background-color: @white;
+
             .van-cell.van-field {
                 background-color: rgba(238, 238, 239, 1);
                 border-radius: 6px;
@@ -197,8 +186,10 @@ export default {
                 padding-bottom: 6px;
                 position: relative;
             }
+
             .filterbox {
                 padding-left: 10px;
+
                 span {
                     font-size: @font-size-common;
                     font-weight: 500;
@@ -208,9 +199,9 @@ export default {
             }
         }
     }
+
     &-main {
         flex: 1;
     }
 }
-
 </style>