|
|
@@ -16,7 +16,7 @@
|
|
|
<view class="card-title">
|
|
|
<text>{{ item.name }}</text>
|
|
|
<text
|
|
|
- :class="item.result == 0 ? 'text-danger' : 'text-primary'">{{ handleResult[item.result] }}</text>
|
|
|
+ :class="item.result == 0 ? 'text-danger' : 'text-primary'">{{ getResult(item.result) }}</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
<view class="card-body">
|
|
|
@@ -51,12 +51,16 @@
|
|
|
getDoneTaskPage,
|
|
|
getDoneTaskList
|
|
|
} from '@/api/wt/index.js'
|
|
|
+ import {
|
|
|
+ getByCode
|
|
|
+ } from '@/api/pda/common.js'
|
|
|
|
|
|
// let [page, isEnd] = [1, false]
|
|
|
export default {
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
+ bpm_process_instance_result: [],
|
|
|
page:1,
|
|
|
size:10,
|
|
|
isEnd:false,
|
|
|
@@ -123,8 +127,28 @@
|
|
|
onShow() {
|
|
|
this.page = 1
|
|
|
this.getList()
|
|
|
+ this.getByCode()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getByCode() {
|
|
|
+ const codeS = ['bpm_process_instance_result']
|
|
|
+ codeS.forEach(async (code) => {
|
|
|
+ const codeValue = await getByCode(code);
|
|
|
+ this[code] = codeValue.map(item => {
|
|
|
+ const key = Object.keys(item)[0]
|
|
|
+ return {
|
|
|
+ value: key,
|
|
|
+ text: item[key]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(code, this[code])
|
|
|
+ })
|
|
|
+ console.log('1111~~~~~~~~~', this.purchase_origin)
|
|
|
+ },
|
|
|
+ getResult(result) {
|
|
|
+ const item = this.bpm_process_instance_result.find(item => item.value == result)
|
|
|
+ return item?.text || ''
|
|
|
+ },
|
|
|
handleDetail(item) {
|
|
|
console.log(item)
|
|
|
uni.navigateTo({
|