Commit 92d0bc2e authored by xioln's avatar xioln

问题修改

parent 5bf56243
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
computed: { computed: {
itemObjOptions () { itemObjOptions () {
this.itemObj.options.forEach(e => { this.itemObj.options.forEach(e => {
if (e.selected) { if (e.selected && !this.value) {
this.radioValue = e.value this.radioValue = e.value
return false return false
} }
......
...@@ -70,7 +70,8 @@ export default { ...@@ -70,7 +70,8 @@ export default {
activeTab: null, activeTab: null,
tabs: [ tabs: [
{ title: '基本信息', key: 'baseInfoDetail' }, { title: '基本信息', key: 'baseInfoDetail' },
{ title: '查看附件', key: 'pdf' } { title: '查看附件', key: 'pdf' },
{ title: '附件', key: 'actionAttachment' }
], ],
dxContentItems: {}, dxContentItems: {},
url: '', url: '',
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</template> </template>
<script> <script>
import { getUsersByAccount } from '@/api/userSystem'
import { completeTask } from '@/api/taskDetail' import { completeTask } from '@/api/taskDetail'
export default { export default {
props: { props: {
...@@ -63,8 +62,30 @@ export default { ...@@ -63,8 +62,30 @@ export default {
methods: { methods: {
SearchFilterEvent (value) { SearchFilterEvent (value) {
let array = [] let array = []
getUsersByAccount({ userAccount: value }).then(res => { const params = {
array = res.items.map(item => { searchItems: {
items: [
{
fieldName: 'userAccount',
operator: 'LIKE',
value: value
},
{
fieldName: 'name',
operator: 'LIKE',
value: value
},
{
fieldName: 'nickName',
operator: 'LIKE',
value: value
}
],
operator: 'AND'
}
}
this.$api.searchApi('DxUserInfo', params).then(res => {
array = res.items.content.map(item => {
return { return {
id: item.id, id: item.id,
label: `${item.name}(${item.num})` label: `${item.name}(${item.num})`
...@@ -72,10 +93,19 @@ export default { ...@@ -72,10 +93,19 @@ export default {
}) })
this.selectList = array this.selectList = array
}) })
// getUsersByAccount({ userAccount: value }).then(res => {
// array = res.items.map(item => {
// return {
// id: item.id,
// label: `${item.name}(${item.num})`
// }
// })
// this.selectList = array
// })
}, },
async beforeClose (action, done) { async beforeClose (action, done) {
if (action === 'confirm') { if (action === 'confirm') {
await this.delegateTask(this.value) await this.delegateTask(this.value, done)
} else { } else {
done() done()
} }
...@@ -84,7 +114,12 @@ export default { ...@@ -84,7 +114,12 @@ export default {
// this.delegateTask(item.id) // this.delegateTask(item.id)
}, },
// 重新指派 // 重新指派
delegateTask (userId) { delegateTask (userId, done) {
if (!this.value) {
this.$utils.showMessage('请选择委派人!', 'warning')
done(false)
return
}
const params = { const params = {
operationName: 'delegateTask', operationName: 'delegateTask',
operator: localStorage.getItem('userId'), operator: localStorage.getItem('userId'),
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<div class="taskDetailHandle"> <div class="taskDetailHandle">
<!-- <div class="sub-title">处理意见</div> --> <!-- <div class="sub-title">处理意见</div> -->
<dee-form <dee-form
v-if="basicData"
ref="taskForm" ref="taskForm"
:form="form" :form="form"
:form-data="formData" :form-data="formData"
...@@ -30,7 +31,72 @@ export default { ...@@ -30,7 +31,72 @@ export default {
data () { data () {
return { return {
form: {}, form: {},
formData: [ // formData: [
// {
// data: [
// {
// title: '处理结果',
// key: 'radio',
// component: {
// name: 'el-radio',
// disabled: false,
// options: []
// }
// },
// {
// title: '备注',
// width: 2,
// key: 'desc',
// component: {
// placeHolder: '请输入',
// name: 'el-input',
// type: 'textarea',
// rows: 3
// }
// }
// ]
// }
// ],
rules: {
radio: [{ required: true, message: '请选择', trigger: 'blur' }]
},
selectRoute: null
}
},
watch: {
basicDataCom: {
deep: true,
immediate: true,
handler (val) {
if (val) {
const r = this.basicData.routes.find(x => x.displayName === val)
if (r) {
this.$nextTick(() => {
this.$set(this.form, 'radio', r.name)
this.selectRoute = r.name
})
}
}
}
}
// 'basicData.result': {
// deep: true,
// // immediate: true,
// handler (oldVal, newVal) {
// console.log('basicData', newVal)
// this.$nextTick(() => {
// // this.init(newVal)
// })
// }
// }
},
computed: {
basicDataCom() {
return this.basicData.result
},
formData() {
return [
{ {
data: [ data: [
{ {
...@@ -39,7 +105,7 @@ export default { ...@@ -39,7 +105,7 @@ export default {
component: { component: {
name: 'el-radio', name: 'el-radio',
disabled: false, disabled: false,
options: [] options: this.formartData(this.basicData?.routes)
} }
}, },
{ {
...@@ -55,22 +121,7 @@ export default { ...@@ -55,22 +121,7 @@ export default {
} }
] ]
} }
], ]
rules: {
radio: [{ required: true, message: '请选择', trigger: 'blur' }]
},
selectRoute: null
}
},
watch: {
'basicData.routes': {
deep: true,
// immediate: true,
handler (oldVal, newVal) {
this.$nextTick(() => {
this.init(newVal)
})
}
} }
}, },
created () { created () {
...@@ -94,7 +145,6 @@ export default { ...@@ -94,7 +145,6 @@ export default {
} }
}) })
}, },
computed: {},
methods: { methods: {
init () { init () {
if (this.basicData.routes) { if (this.basicData.routes) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<van-tabs v-model="active" swipeable> <van-tabs v-model="active" swipeable>
<van-tab v-for="item in tabs" :key="item.key" :title="item.title"> <van-tab v-for="item in tabs" :key="item.key" :title="item.title">
<component <component
v-if="componentsShow" v-if="componentsShow && Object.keys(basicData).length != 0"
:class="[ :class="[
['已办任务', '我发起的任务'].includes($route.query.taskType) && ['已办任务', '我发起的任务'].includes($route.query.taskType) &&
item.title !== '签署文档' && item.title !== '签审历史' item.title !== '签署文档' && item.title !== '签审历史'
...@@ -137,7 +137,9 @@ export default { ...@@ -137,7 +137,9 @@ export default {
this.componentsShow = true this.componentsShow = true
await this.getForm() await this.getForm()
await getTaskDetail(this.$route.query.id).then((res) => { await getTaskDetail(this.$route.query.id).then((res) => {
this.$set(this, 'basicData', res.items) console.log('res', res)
// this.$set(this, 'basicData', res.items)
this.basicData = res.items
res.items.formInfo && res.items.formInfo &&
res.items.formInfo.forEach((item) => { res.items.formInfo.forEach((item) => {
if (item.configName && this.$store.state.tabs.tabs.find(x => item.configName.includes(x.key))) { if (item.configName && this.$store.state.tabs.tabs.find(x => item.configName.includes(x.key))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment