diff --git a/env/.env.development b/env/.env.development index 44dd13a..096ebec 100644 --- a/env/.env.development +++ b/env/.env.development @@ -4,5 +4,5 @@ NODE_ENV = 'development' VITE_DELETE_CONSOLE = false # 是否开启sourcemap VITE_SHOW_SOURCEMAP = true -VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot' +VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot' #VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot' \ No newline at end of file diff --git a/src/api/process/index.ts b/src/api/process/index.ts index f3f67c3..a1db58f 100644 --- a/src/api/process/index.ts +++ b/src/api/process/index.ts @@ -66,3 +66,12 @@ export function getHisInfo(config : Object) { data: config }) } + + +export function taskEntrust(config : Object) { //委托 + return http({ + url: '/act/task/taskEntrust', + method: 'PUT', + data: config + }) +} diff --git a/src/components/SelectDept/SelectDept.vue b/src/components/SelectDept/SelectDept.vue index 22328e3..69823ef 100644 --- a/src/components/SelectDept/SelectDept.vue +++ b/src/components/SelectDept/SelectDept.vue @@ -54,7 +54,7 @@ const props = defineProps({ }, rowKey: { type: String, - default: 'key', + default: 'id', }, labelKey: { type: String, @@ -81,6 +81,7 @@ const confirm = () => { const titles = treeValue.value.map((item) => item.title) const keys = treeValue.value.map((item) => item.key).join(',') showText.value = titles.join(',') + console.log(showText) popupShow.value = false emit('update:modelValue', keys) emit('change', keys) @@ -114,6 +115,7 @@ const handleTreeChange = (value, record) => { const transformField = (result) => { for (let i of result) { i.value = i.key + i.name = i.title if (i.isLeaf == false) { i.leaf = false } else if (i.isLeaf == true) { @@ -131,9 +133,11 @@ const asyncLoadTreeData = ({ originItem }) => { http .get(api.queryDepartTreeSync, param) .then((res: any) => { + console.log(res) if (res.success) { const { result } = res transformField(result) + console.log(result) resolve(result) } else { resolve(null) @@ -155,6 +159,7 @@ function loadRoot() { if (result && result.length > 0) { transformField(result) treeData.value = result + console.log(result) } } else { console.error('部门组件加载根节点数据失败~') @@ -172,14 +177,16 @@ function loadItemByCode() { // @ts-ignore value = value.join(',') } + console.log(treeData) if (value === treeData.value.map((item) => item.key).join(',')) { // 说明是刚选完,内部已有翻译。不需要再请求 return } http - .get(api.queryDepartTreeSync, { ids: value }) + .get(api.queryDepartTreeSync, { ids: value,primaryKey: props.rowKey}) .then((res: any) => { if (res.success) { + console.log(res) const { result = [] } = res showText.value = result.map((item) => item[props.labelKey]).join(',') } else { diff --git a/src/components/SelectUser/components/SelectUserModal.vue b/src/components/SelectUser/components/SelectUserModal.vue index 97cfc92..c5f46fc 100644 --- a/src/components/SelectUser/components/SelectUserModal.vue +++ b/src/components/SelectUser/components/SelectUserModal.vue @@ -23,7 +23,12 @@ @search="handleSearch" @clear="handleClear" /> + + + + +