Commit 8d7bf383f40ca6874e44e0011ad5eab82893a5e3

Authored by wuxw
1 parent 8c097c75

v1.9 优化工作单相关bug

src/api/oa/doWorkApi.js
@@ -17,4 +17,56 @@ export function queryTaskWork(params) { @@ -17,4 +17,56 @@ export function queryTaskWork(params) {
17 reject(error) 17 reject(error)
18 }) 18 })
19 }) 19 })
  20 +}
  21 +
  22 +// 查询工单详情
  23 +export function getWorkInfo(params) {
  24 + return new Promise((resolve, reject) => {
  25 + request({
  26 + url: '/work.listWorkPool',
  27 + method: 'get',
  28 + params
  29 + }).then(response => {
  30 + const res = response.data
  31 + resolve(res.data)
  32 + }).catch(error => {
  33 + reject(error)
  34 + })
  35 + })
  36 +}
  37 +
  38 +// 查询工单任务明细
  39 +export function getWorkTaskItems(params) {
  40 + return new Promise((resolve, reject) => {
  41 + request({
  42 + url: '/task.listWorkTaskItem',
  43 + method: 'get',
  44 + params
  45 + }).then(response => {
  46 + const res = response.data
  47 + resolve(res.data)
  48 + }).catch(error => {
  49 + reject(error)
  50 + })
  51 + })
  52 +}
  53 +
  54 +// 完成抄送工单
  55 +export function finishWorkCopy(data) {
  56 + return new Promise((resolve, reject) => {
  57 + request({
  58 + url: '/work.finishWorkCopy',
  59 + method: 'post',
  60 + data
  61 + }).then(response => {
  62 + const res = response.data
  63 + if (res.code === 0) {
  64 + resolve(res)
  65 + } else {
  66 + reject(new Error(res.msg || '操作失败'))
  67 + }
  68 + }).catch(error => {
  69 + reject(error)
  70 + })
  71 + })
20 } 72 }
21 \ No newline at end of file 73 \ No newline at end of file
src/components/upload/uploadFile.vue
@@ -57,6 +57,11 @@ export default { @@ -57,6 +57,11 @@ export default {
57 this.fileName = file.name 57 this.fileName = file.name
58 this.doUpload(file.raw) 58 this.doUpload(file.raw)
59 }, 59 },
  60 + setFilePath(fileName) {
  61 + this.fileName = fileName
  62 + this.realFileName = fileName
  63 + this.progress = 100
  64 + },
60 async doUpload(file) { 65 async doUpload(file) {
61 const formData = new FormData() 66 const formData = new FormData()
62 formData.append('uploadFile', file) 67 formData.append('uploadFile', file)
src/router/oaRouter.js
@@ -269,9 +269,14 @@ export default [ @@ -269,9 +269,14 @@ export default [
269 name:'/pages/property/visitFinish', 269 name:'/pages/property/visitFinish',
270 component: () => import('@/views/oa/visitFinishList.vue') 270 component: () => import('@/views/oa/visitFinishList.vue')
271 }, 271 },
272 - {  
273 - path:'/pages/oa/workTaskDetail',  
274 - name:'/pages/oa/workTaskDetail',  
275 - component: () => import('@/views/oa/workTaskDetailList.vue')  
276 - }, 272 + {
  273 + path:'/pages/oa/workTaskDetail',
  274 + name:'/pages/oa/workTaskDetail',
  275 + component: () => import('@/views/oa/workTaskDetailList.vue')
  276 + },
  277 + {
  278 + path: '/views/oa/doCopyWork',
  279 + name: '/views/oa/doCopyWork',
  280 + component: () => import('@/views/oa/doCopyWork.vue')
  281 + }
277 ] 282 ]
278 \ No newline at end of file 283 \ No newline at end of file
src/views/oa/addWorkList.vue
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 </el-col> 65 </el-col>
66 <el-col :span="12"> 66 <el-col :span="12">
67 <el-form-item :label="$t('addWork.attachment')"> 67 <el-form-item :label="$t('addWork.attachment')">
68 - <upload-file ref="uploadFile" @notifyFile="notifyFile" /> 68 + <upload-file ref="uploadFile" @notify="notifyFile" />
69 </el-form-item> 69 </el-form-item>
70 </el-col> 70 </el-col>
71 </el-row> 71 </el-row>
@@ -328,6 +328,7 @@ export default { @@ -328,6 +328,7 @@ export default {
328 } 328 }
329 }, 329 },
330 notifyFile(data) { 330 notifyFile(data) {
  331 + this.addWorkInfo.pathUrls = []
331 this.addWorkInfo.pathUrls.push(data.realFileName) 332 this.addWorkInfo.pathUrls.push(data.realFileName)
332 }, 333 },
333 goBack() { 334 goBack() {
src/views/oa/copyWorkList.vue
@@ -293,10 +293,10 @@ export default { @@ -293,10 +293,10 @@ export default {
293 this._listCopyWorks(this.page.current, this.page.size) 293 this._listCopyWorks(this.page.current, this.page.size)
294 }, 294 },
295 _toWorkDetailPage(work) { 295 _toWorkDetailPage(work) {
296 - this.$router.push(`/pages/oa/workDetail?workId=${work.workId}`) 296 + this.$router.push(`/views/oa/workDetail?workId=${work.workId}`)
297 }, 297 },
298 _openCopyWorkModel(work) { 298 _openCopyWorkModel(work) {
299 - this.$router.push(`/pages/oa/doCopyWork?workId=${work.workId}&copyId=${work.copyId}`) 299 + this.$router.push(`/views/oa/doCopyWork?workId=${work.workId}&copyId=${work.copyId}`)
300 }, 300 },
301 async _auditSubmit() { 301 async _auditSubmit() {
302 try { 302 try {
src/views/oa/doCopyWork.vue 0 → 100644
  1 +<template>
  2 + <div class="do-copy-work-container">
  3 + <el-card class="detail-card">
  4 + <div slot="header" class="flex justify-between">
  5 + <span class="">{{ $t('doCopyWork.detail.title') }}</span>
  6 + <el-button size="small" @click="goBack">
  7 + <i class="el-icon-back"></i>
  8 + {{ $t('common.back') }}
  9 + </el-button>
  10 + </div>
  11 +
  12 + <!-- 工单详情信息 -->
  13 + <el-row :gutter="20">
  14 + <el-col :span="6">
  15 + <div class="info-item">
  16 + <label>{{ $t('doCopyWork.detail.workId') }}</label>
  17 + <span>{{ doCopyWorkInfo.workId }}</span>
  18 + </div>
  19 + </el-col>
  20 + <el-col :span="6">
  21 + <div class="info-item">
  22 + <label>{{ $t('doCopyWork.detail.workName') }}</label>
  23 + <span>{{ doCopyWorkInfo.workName }}</span>
  24 + </div>
  25 + </el-col>
  26 + <el-col :span="6">
  27 + <div class="info-item">
  28 + <label>{{ $t('doCopyWork.detail.typeName') }}</label>
  29 + <span>{{ doCopyWorkInfo.typeName }}</span>
  30 + </div>
  31 + </el-col>
  32 + <el-col :span="6">
  33 + <div class="info-item">
  34 + <label>{{ $t('doCopyWork.detail.workCycle') }}</label>
  35 + <span>{{ doCopyWorkInfo.workCycle === '1001' ? $t('doCopyWork.workCycle.once') : $t('doCopyWork.workCycle.periodic') }}</span>
  36 + </div>
  37 + </el-col>
  38 + </el-row>
  39 +
  40 + <el-row :gutter="20" class="margin-top">
  41 + <el-col :span="6">
  42 + <div class="info-item">
  43 + <label>{{ $t('doCopyWork.detail.startTime') }}</label>
  44 + <span>{{ doCopyWorkInfo.startTime }}</span>
  45 + </div>
  46 + </el-col>
  47 + <el-col :span="6">
  48 + <div class="info-item">
  49 + <label>{{ $t('doCopyWork.detail.endTime') }}</label>
  50 + <span>{{ doCopyWorkInfo.endTime }}</span>
  51 + </div>
  52 + </el-col>
  53 + <el-col :span="6">
  54 + <div class="info-item">
  55 + <label>{{ $t('doCopyWork.detail.createUserName') }}</label>
  56 + <span>{{ doCopyWorkInfo.createUserName }}</span>
  57 + </div>
  58 + </el-col>
  59 + <el-col :span="6">
  60 + <div class="info-item">
  61 + <label>{{ $t('doCopyWork.detail.curStaffName') }}</label>
  62 + <span>{{ doCopyWorkInfo.curStaffName || '-' }}</span>
  63 + </div>
  64 + </el-col>
  65 + </el-row>
  66 +
  67 + <el-row :gutter="20" class="margin-top">
  68 + <el-col :span="6">
  69 + <div class="info-item">
  70 + <label>{{ $t('doCopyWork.detail.curCopyName') }}</label>
  71 + <span>{{ doCopyWorkInfo.curCopyName || '-' }}</span>
  72 + </div>
  73 + </el-col>
  74 + <el-col :span="6">
  75 + <div class="info-item">
  76 + <label>{{ $t('doCopyWork.detail.stateName') }}</label>
  77 + <span>{{ doCopyWorkInfo.stateName }}</span>
  78 + </div>
  79 + </el-col>
  80 + <el-col :span="6">
  81 + <div class="info-item">
  82 + <label>{{ $t('doCopyWork.detail.createTime') }}</label>
  83 + <span>{{ doCopyWorkInfo.createTime }}</span>
  84 + </div>
  85 + </el-col>
  86 + <el-col :span="6" v-if="doCopyWorkInfo.pathUrl">
  87 + <div class="info-item">
  88 + <label>{{ $t('doCopyWork.detail.attachment') }}</label>
  89 + <a :href="doCopyWorkInfo.pathUrl" target="_blank">{{ $t('doCopyWork.detail.download') }}</a>
  90 + </div>
  91 + </el-col>
  92 + </el-row>
  93 + </el-card>
  94 +
  95 + <!-- 工单任务明细表格 -->
  96 + <el-card class="table-card margin-top">
  97 + <div slot="header" class="flex justify-between">
  98 + <span>{{ $t('doCopyWork.table.title') }}</span>
  99 + </div>
  100 + <el-table :data="doCopyWorkInfo.items" border style="width: 100%">
  101 + <el-table-column :label="$t('doCopyWork.table.select')" align="center" width="80">
  102 + <template slot-scope="scope">
  103 + <el-radio
  104 + v-if="scope.row.state === 'C'"
  105 + v-model="doCopyWorkInfo.audit.itemId"
  106 + :label="scope.row.itemId"
  107 + @change="selectContent(scope.row)">
  108 + &nbsp;
  109 + </el-radio>
  110 + <span v-else>-</span>
  111 + </template>
  112 + </el-table-column>
  113 + <el-table-column :label="$t('doCopyWork.table.content')" align="left">
  114 + <template slot-scope="scope">
  115 + <div class="flex justify-start">
  116 + <div>{{ scope.$index + 1 }}、</div>
  117 + <div v-html="scope.row.content"></div>
  118 + </div>
  119 + </template>
  120 + </el-table-column>
  121 + <el-table-column prop="remark" :label="$t('doCopyWork.table.remark')" align="center" width="300">
  122 + </el-table-column>
  123 + <el-table-column :label="$t('doCopyWork.table.state')" align="center" width="150">
  124 + <template slot-scope="scope">
  125 + {{ scope.row.state === 'W' ? $t('doCopyWork.state.pending') : $t('doCopyWork.state.processed') }}
  126 + </template>
  127 + </el-table-column>
  128 + <el-table-column prop="staffName" :label="$t('doCopyWork.table.staffName')" align="center" width="150">
  129 + </el-table-column>
  130 + <el-table-column prop="finishTime" :label="$t('doCopyWork.table.finishTime')" align="center" width="180">
  131 + </el-table-column>
  132 + </el-table>
  133 + </el-card>
  134 +
  135 + <!-- 抄送办理 -->
  136 + <el-card class="audit-card margin-top" v-if="doCopyWorkInfo.audit.itemId">
  137 + <div slot="header" class="flex justify-between">
  138 + <span>{{ $t('doCopyWork.audit.title') }}</span>
  139 + </div>
  140 + <el-form :model="doCopyWorkInfo.audit" label-width="120px">
  141 + <el-form-item
  142 + :label="$t('doCopyWork.audit.deductionMoney')"
  143 + v-if="doCopyWorkInfo.deduction === 'Y'">
  144 + <el-input-number
  145 + v-model="doCopyWorkInfo.audit.deductionMoney"
  146 + :placeholder="$t('doCopyWork.audit.deductionMoneyPlaceholder')"
  147 + :precision="2"
  148 + :min="0"
  149 + style="width: 100%">
  150 + </el-input-number>
  151 + </el-form-item>
  152 + <el-form-item :label="$t('doCopyWork.audit.deductionReason')">
  153 + <el-input
  154 + type="textarea"
  155 + v-model.trim="doCopyWorkInfo.audit.deductionReason"
  156 + :placeholder="$t('doCopyWork.audit.deductionReasonPlaceholder')"
  157 + :rows="4">
  158 + </el-input>
  159 + </el-form-item>
  160 + <el-form-item>
  161 + <el-button type="primary" @click="auditSubmit">
  162 + <i class="el-icon-check"></i>
  163 + {{ $t('common.submit') }}
  164 + </el-button>
  165 + </el-form-item>
  166 + </el-form>
  167 + </el-card>
  168 + </div>
  169 +</template>
  170 +
  171 +<script>
  172 +import { getWorkInfo, getWorkTaskItems, finishWorkCopy } from '@/api/oa/doWorkApi'
  173 +
  174 +export default {
  175 + name: 'DoCopyWork',
  176 + data() {
  177 + return {
  178 + loading: false,
  179 + doCopyWorkInfo: {
  180 + workId: '',
  181 + wtId: '',
  182 + workName: '',
  183 + typeName: '',
  184 + workCycle: '',
  185 + startTime: '',
  186 + endTime: '',
  187 + createUserName: '',
  188 + curStaffName: '',
  189 + curCopyName: '',
  190 + stateName: '',
  191 + createTime: '',
  192 + items: [],
  193 + pathUrl: '',
  194 + taskId: '',
  195 + deduction: 'N',
  196 + audit: {
  197 + copyId: '',
  198 + deductionMoney: 0.00,
  199 + deductionReason: '',
  200 + itemId: ''
  201 + }
  202 + }
  203 + }
  204 + },
  205 + created() {
  206 + this.initData()
  207 + },
  208 + methods: {
  209 + async initData() {
  210 + this.doCopyWorkInfo.workId = this.$route.query.workId
  211 + this.doCopyWorkInfo.audit.copyId = this.$route.query.copyId
  212 +
  213 + if (!this.doCopyWorkInfo.workId) {
  214 + this.$message.warning(this.$t('doCopyWork.message.noWorkId'))
  215 + return
  216 + }
  217 +
  218 + await this.loadWorkInfo()
  219 + await this.loadWorkTaskItem()
  220 + },
  221 +
  222 + async loadWorkInfo() {
  223 + try {
  224 + this.loading = true
  225 + const params = {
  226 + workId: this.doCopyWorkInfo.workId,
  227 + page: 1,
  228 + row: 1
  229 + }
  230 + const data = await getWorkInfo(params)
  231 + if (data && data.length > 0) {
  232 + Object.assign(this.doCopyWorkInfo, data[0])
  233 + }
  234 + } catch (error) {
  235 + this.$message.error(this.$t('doCopyWork.message.loadWorkInfoError'))
  236 + } finally {
  237 + this.loading = false
  238 + }
  239 + },
  240 +
  241 + async loadWorkTaskItem() {
  242 + try {
  243 + const params = {
  244 + taskId: this.doCopyWorkInfo.taskId,
  245 + workId: this.doCopyWorkInfo.workId,
  246 + page: 1,
  247 + row: 100
  248 + }
  249 + const data = await getWorkTaskItems(params)
  250 + this.doCopyWorkInfo.items = data || []
  251 + } catch (error) {
  252 + this.$message.error(this.$t('doCopyWork.message.loadTaskItemsError'))
  253 + }
  254 + },
  255 +
  256 + selectContent(item) {
  257 + if (item.state !== 'C') {
  258 + return
  259 + }
  260 + this.doCopyWorkInfo.audit.itemId = item.itemId
  261 + },
  262 +
  263 + async auditSubmit() {
  264 + if (!this.doCopyWorkInfo.audit.itemId) {
  265 + this.$message.warning(this.$t('doCopyWork.message.selectItem'))
  266 + return
  267 + }
  268 +
  269 + if (!this.doCopyWorkInfo.audit.deductionReason) {
  270 + this.$message.warning(this.$t('doCopyWork.message.inputReason'))
  271 + return
  272 + }
  273 +
  274 + if (this.doCopyWorkInfo.deduction === 'Y' && !this.doCopyWorkInfo.audit.deductionMoney) {
  275 + this.$message.warning(this.$t('doCopyWork.message.inputMoney'))
  276 + return
  277 + }
  278 +
  279 + try {
  280 + this.loading = true
  281 + await finishWorkCopy(this.doCopyWorkInfo.audit)
  282 + this.$message.success(this.$t('doCopyWork.message.submitSuccess'))
  283 + this.goBack()
  284 + } catch (error) {
  285 + this.$message.error(this.$t('doCopyWork.message.submitError'))
  286 + } finally {
  287 + this.loading = false
  288 + }
  289 + },
  290 +
  291 + goBack() {
  292 + this.$router.go(-1)
  293 + }
  294 + }
  295 +}
  296 +</script>
  297 +
  298 +<style lang="scss" scoped>
  299 +.do-copy-work-container {
  300 + padding: 20px;
  301 +
  302 + .text-title {
  303 + font-size: 16px;
  304 + font-weight: bold;
  305 + }
  306 +
  307 + .info-item {
  308 + padding: 8px 0;
  309 +
  310 + label {
  311 + color: #606266;
  312 + font-weight: 500;
  313 + margin-right: 10px;
  314 +
  315 + &::after {
  316 + content: ':';
  317 + }
  318 + }
  319 +
  320 + span {
  321 + color: #303133;
  322 + }
  323 +
  324 + a {
  325 + color: #409EFF;
  326 + text-decoration: none;
  327 +
  328 + &:hover {
  329 + text-decoration: underline;
  330 + }
  331 + }
  332 + }
  333 +
  334 + .margin-top {
  335 + margin-top: 20px;
  336 + }
  337 +
  338 + .table-card {
  339 + margin-top: 20px;
  340 + }
  341 +
  342 + .audit-card {
  343 + margin-top: 20px;
  344 + }
  345 +
  346 + .flex {
  347 + display: flex;
  348 + }
  349 +
  350 + .justify-between {
  351 + justify-content: space-between;
  352 + }
  353 +
  354 + .justify-start {
  355 + justify-content: flex-start;
  356 + }
  357 +}
  358 +</style>
  359 +
src/views/oa/doWorkLang.js
@@ -33,6 +33,58 @@ export const messages = { @@ -33,6 +33,58 @@ export const messages = {
33 }, 33 },
34 fetchError: 'Failed to fetch work orders' 34 fetchError: 'Failed to fetch work orders'
35 }, 35 },
  36 + doCopyWork: {
  37 + detail: {
  38 + title: 'Work Order Details',
  39 + workId: 'Work Order ID',
  40 + workName: 'Work Order Name',
  41 + typeName: 'Type Name',
  42 + workCycle: 'Type',
  43 + startTime: 'Start Time',
  44 + endTime: 'End Time',
  45 + createUserName: 'Creator',
  46 + curStaffName: 'Processor',
  47 + curCopyName: 'CC',
  48 + stateName: 'Status',
  49 + createTime: 'Create Time',
  50 + attachment: 'Attachment',
  51 + download: 'Download'
  52 + },
  53 + table: {
  54 + title: 'Work Task Items',
  55 + select: 'Select',
  56 + content: 'Work Order Content',
  57 + remark: 'Processing Opinion',
  58 + state: 'Status',
  59 + staffName: 'Processor',
  60 + finishTime: 'Completion Time'
  61 + },
  62 + audit: {
  63 + title: 'CC Processing',
  64 + deductionMoney: 'Deduction Amount',
  65 + deductionMoneyPlaceholder: 'Required, please enter deduction amount',
  66 + deductionReason: 'Explanation',
  67 + deductionReasonPlaceholder: 'Required, please enter explanation'
  68 + },
  69 + state: {
  70 + pending: 'Pending',
  71 + processed: 'Processed'
  72 + },
  73 + workCycle: {
  74 + once: 'One-time Work Order',
  75 + periodic: 'Periodic Work Order'
  76 + },
  77 + message: {
  78 + noWorkId: 'Work order ID is missing',
  79 + loadWorkInfoError: 'Failed to load work order information',
  80 + loadTaskItemsError: 'Failed to load task items',
  81 + selectItem: 'Please select a processed task item',
  82 + inputReason: 'Please enter an explanation',
  83 + inputMoney: 'Please enter deduction amount',
  84 + submitSuccess: 'Submitted successfully',
  85 + submitError: 'Submission failed'
  86 + }
  87 + }
36 }, 88 },
37 zh: { 89 zh: {
38 doWork: { 90 doWork: {
@@ -68,5 +120,57 @@ export const messages = { @@ -68,5 +120,57 @@ export const messages = {
68 }, 120 },
69 fetchError: '获取工单列表失败' 121 fetchError: '获取工单列表失败'
70 }, 122 },
  123 + doCopyWork: {
  124 + detail: {
  125 + title: '任务单详情',
  126 + workId: '工单编号',
  127 + workName: '工单名称',
  128 + typeName: '类型名称',
  129 + workCycle: '标识',
  130 + startTime: '开始时间',
  131 + endTime: '结束时间',
  132 + createUserName: '发起人',
  133 + curStaffName: '处理人',
  134 + curCopyName: '抄送人',
  135 + stateName: '状态',
  136 + createTime: '创建时间',
  137 + attachment: '附件',
  138 + download: '下载'
  139 + },
  140 + table: {
  141 + title: '工作单内容',
  142 + select: '选择',
  143 + content: '工作单内容',
  144 + remark: '处理意见',
  145 + state: '状态',
  146 + staffName: '处理人',
  147 + finishTime: '完成时间'
  148 + },
  149 + audit: {
  150 + title: '抄送办理',
  151 + deductionMoney: '扣款金额',
  152 + deductionMoneyPlaceholder: '必填,请填写扣款金额',
  153 + deductionReason: '说明',
  154 + deductionReasonPlaceholder: '必填,请填写说明'
  155 + },
  156 + state: {
  157 + pending: '待处理',
  158 + processed: '已处理'
  159 + },
  160 + workCycle: {
  161 + once: '一次性工单',
  162 + periodic: '周期性工单'
  163 + },
  164 + message: {
  165 + noWorkId: '缺少工单编号',
  166 + loadWorkInfoError: '加载工单信息失败',
  167 + loadTaskItemsError: '加载任务明细失败',
  168 + selectItem: '请选择一个已处理的任务明细',
  169 + inputReason: '请输入说明',
  170 + inputMoney: '请输入扣款金额',
  171 + submitSuccess: '提交成功',
  172 + submitError: '提交失败'
  173 + }
  174 + }
71 } 175 }
72 } 176 }
73 \ No newline at end of file 177 \ No newline at end of file
src/views/oa/editWorkList.vue
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 </el-col> 65 </el-col>
66 <el-col :span="12"> 66 <el-col :span="12">
67 <el-form-item :label="$t('editWork.attachment')"> 67 <el-form-item :label="$t('editWork.attachment')">
68 - <upload-file ref="uploadFile" @notifyFile="notifyFile" :defaultFiles="editWorkInfo.pathUrls" /> 68 + <upload-file ref="uploadFile" @notify="notifyFile" :defaultFiles="editWorkInfo.pathUrls" />
69 </el-form-item> 69 </el-form-item>
70 </el-col> 70 </el-col>
71 </el-row> 71 </el-row>
@@ -336,13 +336,15 @@ export default { @@ -336,13 +336,15 @@ export default {
336 this.editWorkInfo.endTime = dateFormat(new Date(data[0].endTime)) 336 this.editWorkInfo.endTime = dateFormat(new Date(data[0].endTime))
337 } 337 }
338 // 处理内容 338 // 处理内容
339 - this.editWorkInfo.contents = data[0].contents.map(c => ({  
340 - id: getUuid(),  
341 - content: c.content  
342 - })) || [{  
343 - id: getUuid(),  
344 - content: ''  
345 - }] 339 + this.editWorkInfo.contents.forEach(c => {
  340 + c.id = getUuid()
  341 + })
  342 + if (data[0].pathUrls && data[0].pathUrls.length > 0) {
  343 + this.editWorkInfo.pathUrls = data[0].pathUrls
  344 + setTimeout(() => {
  345 + this.$refs.uploadFile.setFilePath(data[0].pathUrls[0])
  346 + }, 500)
  347 + }
346 } 348 }
347 }, 349 },
348 async _loadTaskStaff() { 350 async _loadTaskStaff() {
@@ -372,7 +374,7 @@ export default { @@ -372,7 +374,7 @@ export default {
372 const { data } = await listWorkCycle(params) 374 const { data } = await listWorkCycle(params)
373 if (data && data.length > 0) { 375 if (data && data.length > 0) {
374 this.editWorkInfo.period = data[0].period 376 this.editWorkInfo.period = data[0].period
375 - this.editWorkInfo.workCycle = '2002' // 设置为周期工作 377 + this.editWorkInfo.workCycle = data[0].workCycle // 设置为周期工作
376 this.editWorkInfo.hours = data[0].hours || '24' 378 this.editWorkInfo.hours = data[0].hours || '24'
377 379
378 // 处理月份、日期和工作日 380 // 处理月份、日期和工作日
@@ -405,6 +407,7 @@ export default { @@ -405,6 +407,7 @@ export default {
405 } 407 }
406 }, 408 },
407 notifyFile(data) { 409 notifyFile(data) {
  410 + this.editWorkInfo.pathUrls = []
408 this.editWorkInfo.pathUrls.push(data.realFileName) 411 this.editWorkInfo.pathUrls.push(data.realFileName)
409 }, 412 },
410 goBack() { 413 goBack() {
src/views/oa/workTaskDetailList.vue
@@ -273,7 +273,7 @@ export default { @@ -273,7 +273,7 @@ export default {
273 auditMessage: this.$t('workTaskDetail.processed'), 273 auditMessage: this.$t('workTaskDetail.processed'),
274 staffId: '', 274 staffId: '',
275 staffName: '', 275 staffName: '',
276 - pathUrl: '', 276 + pathUrls: '',
277 itemId: '', 277 itemId: '',
278 } 278 }
279 } 279 }
@@ -361,7 +361,8 @@ export default { @@ -361,7 +361,8 @@ export default {
361 this.workTaskDetailInfo.audit.staffName = staff.staffName 361 this.workTaskDetailInfo.audit.staffName = staff.staffName
362 }, 362 },
363 handleNotifyFile(file) { 363 handleNotifyFile(file) {
364 - this.workTaskDetailInfo.audit.pathUrl = file.realFileName 364 + this.workTaskDetailInfo.audit.pathUrls = []
  365 + this.workTaskDetailInfo.audit.pathUrls.push(file.realFileName)
365 }, 366 },
366 async auditSubmit() { 367 async auditSubmit() {
367 try { 368 try {