Commit 92d0bc2e authored by xioln's avatar xioln

问题修改

parent 5bf56243
......@@ -67,7 +67,7 @@ export default {
computed: {
itemObjOptions () {
this.itemObj.options.forEach(e => {
if (e.selected) {
if (e.selected && !this.value) {
this.radioValue = e.value
return false
}
......
......@@ -70,7 +70,8 @@ export default {
activeTab: null,
tabs: [
{ title: '基本信息', key: 'baseInfoDetail' },
{ title: '查看附件', key: 'pdf' }
{ title: '查看附件', key: 'pdf' },
{ title: '附件', key: 'actionAttachment' }
],
dxContentItems: {},
url: '',
......
......@@ -28,7 +28,6 @@
</template>
<script>
import { getUsersByAccount } from '@/api/userSystem'
import { completeTask } from '@/api/taskDetail'
export default {
props: {
......@@ -63,8 +62,30 @@ export default {
methods: {
SearchFilterEvent (value) {
let array = []
getUsersByAccount({ userAccount: value }).then(res => {
array = res.items.map(item => {
const params = {
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 {
id: item.id,
label: `${item.name}(${item.num})`
......@@ -72,10 +93,19 @@ export default {
})
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) {
if (action === 'confirm') {
await this.delegateTask(this.value)
await this.delegateTask(this.value, done)
} else {
done()
}
......@@ -84,7 +114,12 @@ export default {
// this.delegateTask(item.id)
},
// 重新指派
delegateTask (userId) {
delegateTask (userId, done) {
if (!this.value) {
this.$utils.showMessage('请选择委派人!', 'warning')
done(false)
return
}
const params = {
operationName: 'delegateTask',
operator: localStorage.getItem('userId'),
......
......@@ -2,6 +2,7 @@
<div class="taskDetailHandle">
<!-- <div class="sub-title">处理意见</div> -->
<dee-form
v-if="basicData"
ref="taskForm"
:form="form"
:form-data="formData"
......@@ -30,7 +31,72 @@ export default {
data () {
return {
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: [
{
......@@ -39,7 +105,7 @@ export default {
component: {
name: 'el-radio',
disabled: false,
options: []
options: this.formartData(this.basicData?.routes)
}
},
{
......@@ -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 () {
......@@ -94,7 +145,6 @@ export default {
}
})
},
computed: {},
methods: {
init () {
if (this.basicData.routes) {
......
......@@ -12,7 +12,7 @@
<van-tabs v-model="active" swipeable>
<van-tab v-for="item in tabs" :key="item.key" :title="item.title">
<component
v-if="componentsShow"
v-if="componentsShow && Object.keys(basicData).length != 0"
:class="[
['已办任务', '我发起的任务'].includes($route.query.taskType) &&
item.title !== '签署文档' && item.title !== '签审历史'
......@@ -137,7 +137,9 @@ export default {
this.componentsShow = true
await this.getForm()
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.forEach((item) => {
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