update 流程完善

This commit is contained in:
danshihao
2023-12-11 16:30:33 +08:00
parent a496845545
commit 6e17e428d6
6 changed files with 47 additions and 11 deletions
@@ -300,7 +300,7 @@ export default {
},
// 显示意见
handleShowOpinion (record) {
this.$refs.writeOpinionModal.show(record, true)
this.$refs.writeOpinionModal.show(record)
},
// 填写意见
handleWriteOpinion (record) {
@@ -57,7 +57,7 @@ import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { addInspectionContentTable, editInspectionContentTable } from '@api/workCenter'
import { addInspectionContentTable, editInspectionContentTable, getFileIdByInspectId } from '@api/workCenter'
const Base64 = require('js-base64').Base64
@@ -104,15 +104,29 @@ export default {
methods: {
add (data) {
this.data = Object.assign({}, data)
this.getFileInfo(data.file).then(res => {
this.handlePreview(res)
// 后端获取预览文件id接口
getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
return res.success ? res.result.id : ''
}).then(fileId => {
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
})
}).catch(err => {
console.log(err)
})
this.visible = true
this.form.resetFields()
},
edit (data, record, index) {
this.getFileInfo(data.file).then(res => {
this.handlePreview(res)
// 后端获取预览文件id接口
getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
return res.success ? res.result.id : ''
}).then(fileId => {
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
})
}).catch(err => {
console.log(err)
})
this.visible = true
this.index = index
@@ -61,7 +61,7 @@
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.score')"
prop="evaluateScore">
<a-input-number v-model="form.evaluateScore" :min="1" :max="200" disabled
<a-input-number v-model="form.evaluateScore" :min="0" :max="100" disabled
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
@@ -61,7 +61,7 @@
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.score')"
prop="evaluateScore">
<a-input-number v-model="form.evaluateScore" :min="1" :max="200"
<a-input-number v-model="form.evaluateScore" :min="0" :max="100"
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
@@ -17,9 +17,12 @@
<!--基本信息-->
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
<!-- 流程信息 -->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<div class="process-part-title">
{{ $t('processInformation') }}
<a-icon type="double-right" :class="isShowProcessInfo ? 'pack-up-btn' : 'unfold-btn'" @click="changeShowProcessInfo" />
</div>
<a-form :form="processInfoForm">
<a-row>
<a-row v-show="isShowProcessInfo">
<a-col :span="12">
<!-- 流程名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
@@ -120,6 +123,8 @@ export default {
mixins: [WorkCenterMixin],
data () {
return {
// 是否显示流程信息
isShowProcessInfo: true,
loading: false,
switchValue: 'base',
disabled: false,
@@ -219,6 +224,10 @@ export default {
this.getProjectId()
},
methods: {
// 切换折叠显示流程信息
changeShowProcessInfo () {
this.isShowProcessInfo = !this.isShowProcessInfo
},
/**
* 获取项目id
*/
@@ -496,6 +505,16 @@ export default {
}
</script>
<style scoped>
<style scoped lang="less">
@import '~@assets/less/common.less';
.pack-up-btn {
transform: rotate(-90deg);
color: @primary-color;
}
.unfold-btn {
transform: rotate(90deg);
color: @primary-color;
}
</style>