zhouwx
7 天以前 812f2afdb6f9ca500a10806ad25641288dcd9cfd
src/views/work/sealManagement/apply/components/editDialog.vue
@@ -102,14 +102,14 @@
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
        <el-row :gutter="24" >
          <el-col :span="24" style="margin-left: 50px">
            <span style="font-size: 19px;font-weight: 600;">签字意见</span>
            <el-table :data="state.form.flows" :border="true" style="width: 90%;margin-top: 10px">
              <el-table-column label="流程名称" prop="flowName" width="220" align="center"></el-table-column>
              <el-table-column label="内容" align="center">
                <template #default="scope">
                  <span>{{scope.row.approveDeptName}}/{{scope.row.approveUserName}} {{scope.row.approveTime}} {{scope.row.approveContent}}</span>
                <template #default="scope" v-if="title != '新增'">
                  <span>{{scope.row.approveDeptName}}/{{scope.row.approveUserName}} {{scope.row.approveTime}} {{scope.row.approveContent}} {{scope.row.approveMess}}</span>
                </template>
              </el-table-column>
            </el-table>
@@ -197,6 +197,7 @@
})
const openDialog = async (type, value,companyList) => {
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  state.isAdmin = userInfo.userType === 0;
  state.form.companyName = userInfo.companyName
@@ -221,6 +222,11 @@
      status: null
    }
    state.form.flows[0]=obj
    if(!state.form.applyDeptId){
      ElMessage.warning('该用户无所属部门!')
      return
    }
    //部门负责人信息
    await getLeaderInfo()
    await getFlowList()
@@ -229,7 +235,7 @@
    state.companyList = companyList
    state.form.companyId = null
  }
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
    state.form.compilationBy = state.form.compilationId
@@ -261,6 +267,7 @@
      approveUserName: res.data.leaderName,
      approveDeptName: res.data.deptName,
      approveContent: '',
      approveMess:'',
      approveTime: null,
      approveStatus: null,
      status: null
@@ -294,10 +301,12 @@
    pageSize: 999,
    companyId: state.form.companyId
  }
  const res = await getSealFlow(param)
  if(res.code === 200){
    res.data.forEach(item => {
      item.approveDeptName = item.deptName
      item.approveDeptId = item.deptId
    })
    if(title.value == '新增'){
      state.form.flows = state.form.flows.concat(res.data)
@@ -314,7 +323,6 @@
    if(title.value === '新增'){
      console.log('sta',state.form)
      state.form.flows[0].approveTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
      debugger
      const {id, ...data} = JSON.parse(JSON.stringify(state.form))
      const res = await addSealApply(data)
      if(res.code === 200){
@@ -446,7 +454,7 @@
  const path = file.path
  const ext = path.split('.').pop().toLowerCase();
  if (ext === 'doc' || ext === 'xls' || ext === 'xlsx'|| ext === 'ppt'|| ext === 'pptx')  {
    ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
    ElMessageBox.confirm('暂不支持线上预览.doc、.xls、.xlsx文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
      window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
    }).catch(() => {
      console.log('取消预览')