Commit 62789451 authored by ztf's avatar ztf

修改自定义组件’相关闭环跟进事项‘,添加选择项目代号组件

parent 151701d9
...@@ -16,13 +16,18 @@ export default { ...@@ -16,13 +16,18 @@ export default {
basicData: { basicData: {
type: Object, type: Object,
default: () => null default: () => null
},
permissions: {
type: [Array, Object],
default: () => null
} }
// permissions: {
// type: [Array, Object],
// default: () => null
// }
}, },
data() { data() {
const that = this
const link = {
color: '#2A75CE',
cursor: 'pointer'
}
return { return {
applyDocLoading: false, applyDocLoading: false,
replyDocLoding: false, replyDocLoding: false,
...@@ -31,14 +36,13 @@ export default { ...@@ -31,14 +36,13 @@ export default {
columns: [{ columns: [{
'title': '编号', 'title': '编号',
'key': 'source.number', 'key': 'source.number',
'level': 1, align: 'center',
'show': true, component: {
'defaultItem': true, render: function(h, data) {
'formatterKey': 'component', return <span style={link} v-on:click={() => {
'component': { that.jump(data)
'name': 'jumpDetailsPage', }}>{data.source.number}</span>
'show': true, }
'props': '{}'
} }
}, },
{ {
...@@ -168,6 +172,13 @@ export default { ...@@ -168,6 +172,13 @@ export default {
}).finally(() => { }).finally(() => {
this.replyDocLoding = false this.replyDocLoding = false
}) })
},
// 跳转到对应对象详情页
jump(data) {
this.$router.push({
path: `/configured-page/cd/${data.source.subTypeName}/${'defaultInfo'}/${data.source.id}`,
query: { title: (data.source.name || data.source.id) + '详情' }
})
} }
} }
} }
......
<template>
<div class="selectprojectCode">
<!-- 下拉框 -->
<el-select
v-model="projectCode"
clearable
placeholder=""
@change="handleChange
"
>
<el-option
v-for="item in projectCodeOptions"
:key="item.parentKey"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'SelectProjectCode',
componentName: '选择项目代号',
data() {
return {
projectCode: '',
projectCodeOptions: []
}
},
mounted() {
console.log('开始获取数据了')
this.getProjectCodeList()
},
methods: {
getProjectCodeList() {
const params = {
pageFrom: 1,
pageSize: 9999,
searchItems: {
children: [{}],
'items': [{
'fieldName': 'dictState',
'operator': 'EQ',
'value': 'ENABLE'
},
{
'fieldName': 'dictCode',
'operator': 'EQ',
'value': 'ProjectCode'
}
],
'operator': 'AND'
}
}
post('/DictData/search', params).then((res) => {
console.log('请求了')
if (res.items.content.length) {
this.projectCodeOptions = res.items.content.map((row) => {
return {
value: row.dictKey,
label: row.dictValue,
parentKey: row.parentKey
}
})
console.log(' this.projectCodeOptions', this.projectCodeOptions)
}
})
},
handleChange(val) {
this.$emit('input', val)
}
}
}
</script>
<style lang="scss" scoped></style>
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