diff --git a/front/src/api/personalCenter.js b/front/src/api/personalCenter.js index 8e825bd7..83566908 100644 --- a/front/src/api/personalCenter.js +++ b/front/src/api/personalCenter.js @@ -189,3 +189,19 @@ export function getCategoryTreePage(params) { params, }) } +// 申购车根据部门分类 +export function selectResourceCarGroupByDept(params) { + return request({ + url: '/resourcecar/selectResourceCarGroupByDept', + method: 'get', + params, + }) +} +// 申购车根据部门查询 +export function selectResourceListByDept(params) { + return request({ + url: '/resourcecar/selectResourceListByDept', + method: 'get', + params, + }) +} diff --git a/front/src/views/home/AbilityToApplyFor.vue b/front/src/views/home/AbilityToApplyFor.vue index 8f2e607b..8889a61a 100644 --- a/front/src/views/home/AbilityToApplyFor.vue +++ b/front/src/views/home/AbilityToApplyFor.vue @@ -10,12 +10,16 @@ {{ item.deptName }} -
- {{ item.name }} - {{ item.type }} -
-
{{ item.description }}
-
+ @@ -28,6 +32,7 @@ dataList: { type: Array, default: null }, }) let dataForm = ref([]) + // eslint-disable-next-line vue/no-setup-props-destructure dataForm.value = props.dataList const router = useRouter() const arr = @@ -66,9 +71,9 @@ margin-bottom: 0.2rem; } .ability-to-apply-for-content { - margin-bottom: 0.3rem; - border-bottom: 0.01rem #dddee1 solid; - padding-bottom: 0.3rem; + // margin-bottom: 0.3rem; + // border-bottom: 0.01rem #dddee1 solid; + // padding-bottom: 0.3rem; padding-right: 0.5rem; position: relative; .dep-name { @@ -87,6 +92,12 @@ margin-right: 0.05rem; } } + .item { + padding-bottom: 0.1rem; + margin-bottom: 0.1rem; + border-bottom: 1px solid #dddee1; + position: relative; + } .name { margin-bottom: 0.2rem; span:first-child { @@ -103,6 +114,7 @@ } } .description { + width: 10rem; color: rgba(0, 0, 0, 0.45); } .remove { diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index bc20876b..17b1c514 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -7,7 +7,7 @@ -->
- +
@@ -280,23 +280,29 @@ formName.unit = res.data.data.deptName }) }) - console.log( - 'router传参==================>', - router.currentRoute.value.query.name - ) - let arr = - router.currentRoute.value.query.name instanceof Array - ? router.currentRoute.value.query.name - : [router.currentRoute.value.query.name] - console.log(router.currentRoute.value.query.ids) - const ids = router.currentRoute.value.query.ids - let dataResourceId = router.currentRoute.value.query.resourceId - dataResourceId.map((item) => { - selectOne(item).then((res) => { - dataList.value.push(res.data.data) - console.log('dataResourceId', dataList.value) - }) - }) + const list = ref(JSON.parse(localStorage.getItem('applyList'))) + console.log('本地存储====================》', list.value) + // console.log( + // 'router传参==================>', + // router.currentRoute.value.query.name + // ) + // let arr = + // router.currentRoute.value.query.name instanceof Array + // ? router.currentRoute.value.query.name + // : [router.currentRoute.value.query.name] + // const ids = router.currentRoute.value.query.ids + // console.log( + // 'ids==========================>', + // ids, + // router.currentRoute.value.query.ids + // ) + // let dataResourceId = router.currentRoute.value.query.resourceId + // dataResourceId.map((item) => { + // selectOne(item).then((res) => { + // dataList.value.push(res.data.data) + // console.log('dataResourceId', dataList.value) + // }) + // }) const businessKey = ref(router.currentRoute.value.query.id) const taskId = ref(router.currentRoute.value.query.taskId) if (businessKey.value) { @@ -365,65 +371,65 @@ if (!formName) { return message.error('请设置表单名称') } - if (arr && arr.length !== 0) { - console.log('提交') - const obj = ref({}) - for (const key in formName) { - if (key !== 'formNameSystem') { - obj.value[key] = formName[key] - } - } - submitApply(obj.value).then((res) => { - applySuccess.value = false - message.success('操作成功!') - console.log('能力申请================>', res) - if (ids) { - sgcDel({ ids: ids }).then((res) => { - if (res.data.msg === 'success') { - mybus.emit('getSgcNum') - } - }) - } - }) - } else { - lastestPage({ - key: dataForm.processDefinitionKey, - }) - .then(({ data: res }) => { - if (res.code !== 0) { - return message.error(res.msg) - } - if (!res.data.list || res.data.list.length <= 0) { - return message.error('没有查询到流程,请先设计流程') - } - // proxy.$http['post'](formUrl, rootObj[formName]) - tabilityapplication(formName) - .then(({ data: res }) => { - if (res.code !== 0) { - message.error(res.msg) - if (callbacks.formSaveErrorCallback) { - callbacks.formSaveErrorCallback(res) - } - } - if (callbacks.formSaveSuccessCallback) { - callbacks.formSaveSuccessCallback(res) - } - if (!res.data.businessKey) { - return message.error('业务KEY为空,无法启动流程') - // startProcess(dataForm.processDefinitionKey, null, rootObj[formName]) - } else { - startProcess( - dataForm.processDefinitionKey, - res.data.businessKey - // rootObj[formName] - ) - } - }) - .catch(() => {}) - }) - .catch(() => {}) - // }) - } + // if (arr && arr.length !== 0) { + // console.log('提交') + // const obj = ref({}) + // for (const key in formName) { + // if (key !== 'formNameSystem') { + // obj.value[key] = formName[key] + // } + // } + // submitApply(obj.value).then((res) => { + // applySuccess.value = false + // message.success('操作成功!') + // console.log('能力申请================>', res) + // if (ids) { + // sgcDel({ ids: ids }).then((res) => { + // if (res.data.msg === 'success') { + // mybus.emit('getSgcNum') + // } + // }) + // } + // }) + // } else { + // lastestPage({ + // key: dataForm.processDefinitionKey, + // }) + // .then(({ data: res }) => { + // if (res.code !== 0) { + // return message.error(res.msg) + // } + // if (!res.data.list || res.data.list.length <= 0) { + // return message.error('没有查询到流程,请先设计流程') + // } + // // proxy.$http['post'](formUrl, rootObj[formName]) + // tabilityapplication(formName) + // .then(({ data: res }) => { + // if (res.code !== 0) { + // message.error(res.msg) + // if (callbacks.formSaveErrorCallback) { + // callbacks.formSaveErrorCallback(res) + // } + // } + // if (callbacks.formSaveSuccessCallback) { + // callbacks.formSaveSuccessCallback(res) + // } + // if (!res.data.businessKey) { + // return message.error('业务KEY为空,无法启动流程') + // // startProcess(dataForm.processDefinitionKey, null, rootObj[formName]) + // } else { + // startProcess( + // dataForm.processDefinitionKey, + // res.data.businessKey + // // rootObj[formName] + // ) + // } + // }) + // .catch(() => {}) + // }) + // .catch(() => {}) + // // }) + // } }) } } @@ -528,31 +534,31 @@ } const fileList = ref([]) //删除改变arr - mybus.on('reomveOldData', (item) => { - debugger - arr = [] - formName.system = [] - record.value = record.value + '1' - arr = item.Name - dataResourceId = item.depID - if (arr && arr.length !== 0) { - disabled.value = true - let str = '' - arr.forEach((val, index) => { - str += val - if (index < arr.length - 1) { - str += '、' - } - }) - formName.formNameSystem = str - } - arr.forEach((val, index) => { - formName.system.push({ - resourceName: val, - resourceId: dataResourceId[index], - }) - }) - }) + // mybus.on('reomveOldData', (item) => { + // debugger + // arr = [] + // formName.system = [] + // record.value = record.value + '1' + // arr = item.Name + // // dataResourceId = item.depID + // if (arr && arr.length !== 0) { + // disabled.value = true + // let str = '' + // arr.forEach((val, index) => { + // str += val + // if (index < arr.length - 1) { + // str += '、' + // } + // }) + // formName.formNameSystem = str + // } + // arr.forEach((val, index) => { + // formName.system.push({ + // resourceName: val, + // // resourceId: dataResourceId[index], + // }) + // }) + // }) onBeforeUnmount(() => { mybus.off('reomveOldData') }) @@ -566,6 +572,7 @@ startProcess, options, fileList, + list, headers: { authorization: 'authorization-text', }, @@ -585,7 +592,7 @@ // background-color: #f5f8fc; height: 100%; width: 100%; - margin: 130px auto 0; + margin: 0.8rem auto 0; display: flex; justify-content: space-between; aside { diff --git a/front/src/views/personalCenter/components/PurchaseVehicle.vue b/front/src/views/personalCenter/components/PurchaseVehicle.vue index 4a2ff938..19869be9 100644 --- a/front/src/views/personalCenter/components/PurchaseVehicle.vue +++ b/front/src/views/personalCenter/components/PurchaseVehicle.vue @@ -1,18 +1,13 @@