新能力申请

This commit is contained in:
a0049873 2022-06-29 17:28:49 +08:00
parent 7cfebcfef8
commit ccbcab8dfa
9 changed files with 833 additions and 253 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-11 10:11:40 * @Date: 2022-04-11 10:11:40
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-23 18:30:45 * @LastEditTime: 2022-06-29 16:59:38
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -42,8 +42,9 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script> <script>
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
// WebSocket地址 // WebSocket地址
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket'; window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';

View File

@ -241,106 +241,105 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .big-BOX{ ::v-deep .big-BOX {
background:rgba(244,245,248,0.8); background: rgba(244, 245, 248, 0.8);
padding:24px; padding: 24px;
h3{ h3 {
font-size:16px; font-size: 16px;
color:#212121 color: #212121;
} }
p{ p {
width:78%; width: 78%;
display:flex; display: flex;
justify-content: space-between; justify-content: space-between;
color:#212121; color: #212121;
font-size:14px; font-size: 14px;
span{ span {
display:inline-block; display: inline-block;
margin-left:8px; margin-left: 8px;
line-height:32px; line-height: 32px;
span{ span {
font-weight:bold; font-weight: bold;
} }
} }
} }
p:last-of-type{ p:last-of-type {
margin-top:16px; margin-top: 16px;
width:100%; width: 100%;
span{ span {
display:flex; display: flex;
span{ span {
padding:0 12px; padding: 0 12px;
height:32px; height: 32px;
background:rgba(232,234,239,1); background: rgba(232, 234, 239, 1);
border-radius:2px; border-radius: 2px;
button{ button {
background:unset; background: unset;
border:0; border: 0;
color:#0558e1; color: #0558e1;
font-size:14px; font-size: 14px;
} }
} }
} }
} }
} }
::v-deep .AbilityApply{ ::v-deep .AbilityApply {
margin-top:32px; margin-top: 32px;
h3{ h3 {
font-size:16px; font-size: 16px;
color:#212121; color: #212121;
border-bottom:1px solid #dddee1; border-bottom: 1px solid #dddee1;
padding-bottom:10px; padding-bottom: 10px;
} }
ul{ ul {
padding-left: 0px; padding-left: 0px;
li{ li {
list-style:none; list-style: none;
padding: 30px 0; padding: 30px 0;
border-bottom: 1px solid #dddee1; border-bottom: 1px solid #dddee1;
display:flex; display: flex;
img{ img {
width:100px; width: 100px;
height:100px; height: 100px;
} }
div{ div {
margin-left:16px; margin-left: 16px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
h2{ h2 {
margin-bottom:20px; margin-bottom: 20px;
font-size:20px; font-size: 20px;
color:#000; color: #000;
display:flex; display: flex;
span{ span {
display:block; display: block;
font-size:14px; font-size: 14px;
color:#ffffff; color: #ffffff;
margin-left:8px; margin-left: 8px;
background:rgba(0,184,230,0.8); background: rgba(0, 184, 230, 0.8);
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 5px; padding: 0 5px;
border-radius: 4px; border-radius: 4px;
} }
} }
p{ p {
margin-bottom:0; margin-bottom: 0;
} }
} }
} }
.clearfix:after{ .clearfix:after {
display:block; display: block;
content:""; content: "";
clear:both; clear: both;
} }
.title{ .title {
color:#0558e1; color: #0558e1;
font-size:18px; font-size: 18px;
padding-bottom:0; padding-bottom: 0;
border-bottom: 0; border-bottom: 0;
} }
.title:before { .title:before {
content: ""; content: "";
@ -353,68 +352,66 @@ export default {
margin-right: 10px; margin-right: 10px;
margin-top: 6px; margin-top: 6px;
} }
} }
} }
::v-deep .agreeOr>div{ ::v-deep .agreeOr > div {
display:flex; display: flex;
align-items: center; align-items: center;
.el-input{ .el-input {
margin-right: 10px; margin-right: 10px;
margin-left: 32px; margin-left: 32px;
} }
} }
::v-deep .agreeOr>div:last-of-type{ ::v-deep .agreeOr > div:last-of-type {
margin-top:15px; margin-top: 15px;
}
.blueAll {
::v-deep .el-radio-button__inner {
width: 80px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
background: #ffffff;
color: #0558e1;
border: 1px solid #0558e1;
} }
.blueAll{ ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
::v-deep .el-radio-button__inner{
width:80px;
height:32px;
line-height:32px;
padding:0;
border-radius:2px;
background:#ffffff;
color:#0558e1;
border:1px solid #0558e1;
}
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner{
box-shadow: unset !important; box-shadow: unset !important;
background:#0558e1; background: #0558e1;
color:#ffffff; color: #ffffff;
} }
}
.inputBule {
width: 55px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
background: #0558e1;
color: #ffffff;
border: 1px solid #0558e1;
}
.redAll {
margin-left: 10px;
::v-deep .el-radio-button__inner {
width: 80px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
border: 1px solid #e83a48;
background: #ffffff;
color: #e83a48;
margin-left: 10px;
} }
.inputBule{ ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
width:55px;
height:32px;
line-height:32px;
padding:0;
border-radius:2px;
background:#0558e1;
color:#ffffff;
border:1px solid #0558e1;
}
.redAll{
margin-left:10px;
::v-deep .el-radio-button__inner{
width:80px;
height:32px;
line-height:32px;
padding:0;
border-radius:2px;
border:1px solid #e83a48;
background:#ffffff;
color:#e83a48;
margin-left:10px;
}
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner{
box-shadow: unset !important; box-shadow: unset !important;
color:#ffffff; color: #ffffff;
background: #e83a48; background: #e83a48;
} }
} }
.blueInput{ .blueInput {
width:55px; width: 55px;
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-27 11:50:45 * @LastEditTime: 2022-06-29 16:31:26
* @Description: 能力申请 * @Description: 能力申请
--> -->
<template> <template>
@ -43,11 +43,7 @@
<el-table-column label="申请人" header-align="center" align="center"> <el-table-column label="申请人" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
(scope.row.params && scope.row.params.user) || (scope.row.params && scope.row.params.tAbilityApplicationDTOList[0].user)
(scope.row.params && scope.row.params.applyUserName) ||
(scope.row.params && scope.row.params.userName) ||
(scope.row.params && scope.row.params.undercarriageUserName)||
(scope.row.params && scope.row.params.name)
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -58,13 +54,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
(scope.row.params && scope.row.params.system) || (scope.row.params && scope.row.params.tAbilityApplicationDTOList[0].title)
(scope.row.params && scope.row.params.demandSubject) ||
(scope.row.params &&
scope.row.params.resourceDTO &&
scope.row.params.resourceDTO.name) ||
(scope.row.params && scope.row.params.undercarriageReason)||
(scope.row.params && scope.row.params.comment)
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -104,12 +94,12 @@
@click="taskHandle(scope.row)" @click="taskHandle(scope.row)"
>{{ $t("manage") }}</el-button >{{ $t("manage") }}</el-button
> >
<el-button <!-- <el-button
type="text" type="text"
size="small" size="small"
@click="taskDetail(scope.row)" @click="taskDetail(scope.row)"
>{{ $t("process.viewFlowImage") }}</el-button >{{ $t("process.viewFlowImage") }}</el-button
> > -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -143,7 +133,8 @@ export default {
}, },
dataForm: { dataForm: {
taskName: '', taskName: '',
taskId: '' taskId: '',
processDefinitionKey: 'abilityprocess_v2'
}, },
processInstanceId: '' processInstanceId: ''
} }

View File

@ -0,0 +1,460 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-29 15:59:51
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-29 17:21:00
* @Description: 告诉大家这是什么
-->
<!-- 流程业务表单 -->
<template>
<el-card shadow="never" class="aui-card--fill" :key='showKey'>
<!-- 申请人详情 -->
<div>
<h3>申请人信息</h3>
<div class="big-BOX">
<p>
<span class="text">申请人<span> {{dataForm.content.user || '--'}}</span></span>
<span class="text">电话<span>{{dataForm.content.phone || '--'}}</span></span>
<span class="text">单位<span>{{dataForm.content.unit || '--'}}</span></span>
</p>
<p>
<span class="text"> 能力申请标题<span> {{dataForm.content.title|| '--'}}</span></span>
<span class="text">应用系统<span>{{dataForm.content.applicationSystem || '--'}}</span></span>
<span class="text">应用场景<span> {{dataForm.content.applicationSceneStr || '--'}}</span></span>
</p>
<p>
<span> 能力应用期望效果<span> {{dataForm.content.effectWish|| '--'}}</span></span>
</p>
<p v-if="dataForm.content.enclosure">
<span> 申请附件<span> {{dataForm.content.enclosure|| '--'}}<button @click="downloadFile2(dataForm.content.enclosure)">预览</button></span></span>
</p>
</div>
</div>
<!-- 申请能力 -->
<div class="AbilityApply">
<h3>申请能力</h3>
<ul v-for="item in dataList" :key="item.id">
<!-- <li class="title">{{item.address}}</li> -->
<li class="clearfix">
<img
src="~@/assets/img/imgLeft.png"
/>
<div>
<h2>{{item.name}}<span>{{item.type}}</span></h2>
<p>{{item.describe}}</p>
</div>
</li>
</ul>
</div>
<!-- 流程综合组件 -->
<!-- <ren-process-multiple
v-if="processVisible"
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
saveFormUrl="/processForm/tabilityapplication"
dataFormName="dataForm"
ref="renProcessMultiple"
></ren-process-multiple> -->
<!-- 审批 -->
<div class="agreeOr">
<h3>审批</h3>
<div>
<el-radio-group v-model="agreeOrList" style="width:230px;">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button>
</el-radio-group>
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
<el-button class="inputBule" @click="agreeOrNot">提交</el-button>
</div>
</div>
<!-- 流程详情 -->
<ren-process-detail-import></ren-process-detail-import>
</el-card>
</template>
<script>
//
import processModule from '@/mixins/process-module'
import debounce from 'lodash/debounce'
import qs from 'qs'
import RenProcessDetailImport from '@/components/ren-process-detail/src/ren-process-detail-import'
export default {
//
mixins: [processModule],
data () {
return {
visible: true,
showKey: 0,
//
// fieldDisabled: false,
// dataForm: {
// id: '',
// user: '',
// phone: '',
// unit: '',
// area: '',
// system: '',
// scene: '',
// basis: ''
// }
dataForm: {
id: '',
content: {}
},
dataList: [],
inputAgree: '',
inputNo: '',
agreeOrList: '同意'
}
},
created () {
// KEY
console.log('params=================>', this.$route, this.$route.params)
this.dataForm.taskId = this.$route.params.taskId
this.init()
// //
var callbacks = {
startProcessSuccessCallback: this.closeCurrentTab,
startProcessErrorCallback: this.startProcessErrorCallback,
taskHandleSuccessCallback: this.closeCurrentTab,
taskHandleErrorCallback: this.taskHandleErrorCallback,
formSaveSuccessCallback: null,
formSaveErrorCallback: null
}
//
this.initProcessMultiple(callbacks)
},
computed: {
// dataRule () {
// return {
// inputAgree: [
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
// ],
// inputNo: [
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
// ]
// }
// }
},
components: {
RenProcessDetailImport
},
methods: {
init () {
// this.visible = true
this.$nextTick(() => {
// this.$refs.dataForm.resetFields()
if (this.dataForm.taskId) {
// KEY
// this.fieldDisabled = true
this.getInfo()
console.log(this.dataForm, 'init')
}
})
},
downloadFile2 (url) {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(url))
)
},
//
getInfo () {
this.$http
.get(`/act/task/getTaskVariables?taskId=${this.dataForm.taskId}&variableName=tAbilityApplicationDTOList`)
.then(({ data: res }) => {
if (res.code !== 0) {
console.log(res.data)
return this.$message.error(res.msg)
}
console.log(res.data, this.dataForm, 'elas============================')
if (res.data.tAbilityApplicationDTOList[0].applicationScene) {
res.data.tAbilityApplicationDTOList[0].applicationSceneStr = ''
res.data.tAbilityApplicationDTOList[0].applicationScene.map((val, index) => {
res.data.tAbilityApplicationDTOList[0].applicationSceneStr += val
if (index < res.data.tAbilityApplicationDTOList[0].applicationScene.length - 1) {
res.data.tAbilityApplicationDTOList[0].applicationSceneStr += '、'
}
})
}
this.dataForm.content = res.data.tAbilityApplicationDTOList[0]
res.data.tAbilityApplicationDTOList.map(val => {
this.$http.get('/resource/' + val.resourceId).then(res1 => {
console.log(res1.data.data, '1111111111111111111111111111111111')
this.dataList.push({
name: res1.data.data.name,
type: res1.data.data.type,
describe: res1.data.data.description
})
})
})
})
.catch(() => {})
},
//
applyData () {
this.$http
.get(`/resource/select/${this.dataForm.instanceId}`)
.then(({ data: res }) => {
if (res.code !== 0) {
console.log(res.data, 'hhhhh')
// return this.$message.error(res.msg)
}
// console.log(res.data, 'elas')
// this.dataForm.content = res.data
// console.log(this.dataForm, 'ela')
})
.catch(() => {})
},
// 退
agreeOrNot: debounce(function () {
if (this.agreeOrList === '同意') {
console.log('this.dataForm', this.dataForm)
const params = qs.stringify({
taskId: this.dataForm.taskId,
comment: this.inputAgree
})
console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
}).catch(() => {})
} else if (this.agreeOrList === '退回') {
const params = qs.stringify({
taskId: this.dataForm.taskId,
comment: this.inputNo
})
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
}
}, 1000, { leading: true, trailing: false }),
//
startProcessErrorCallback (data) {
console.log(data)
},
//
taskHandleErrorCallback (data) {}
},
mounted () {
// this.applyData()
}
}
</script>
<style scoped lang="scss">
::v-deep .big-BOX {
background: rgba(244, 245, 248, 0.8);
padding: 24px;
h3 {
font-size: 16px;
color: #212121;
}
p {
width: 100%;
display: flex;
justify-content: space-between;
color: #212121;
font-size: 14px;
span {
display: inline-block;
margin-left: 8px;
line-height: 32px;
span {
font-weight: bold;
}
}
.text {
width: 500px;
}
}
p:last-of-type {
margin-top: 16px;
width: 100%;
span {
display: flex;
span {
padding: 0 12px;
height: 32px;
background: rgba(232, 234, 239, 1);
border-radius: 2px;
button {
background: unset;
border: 0;
color: #0558e1;
font-size: 14px;
}
}
}
}
}
::v-deep .AbilityApply {
margin-top: 32px;
h3 {
font-size: 16px;
color: #212121;
border-bottom: 1px solid #dddee1;
padding-bottom: 10px;
}
ul {
padding-left: 0px;
li {
list-style: none;
padding: 30px 0;
border-bottom: 1px solid #dddee1;
display: flex;
img {
width: 100px;
height: 100px;
}
div {
margin-left: 16px;
display: flex;
flex-direction: column;
justify-content: center;
h2 {
margin-bottom: 20px;
font-size: 20px;
color: #000;
display: flex;
span {
display: block;
font-size: 14px;
color: #ffffff;
margin-left: 8px;
background: rgba(0, 184, 230, 0.8);
display: flex;
align-items: center;
padding: 0 5px;
border-radius: 4px;
}
}
p {
margin-bottom: 0;
}
}
}
.clearfix:after {
display: block;
content: "";
clear: both;
}
.title {
color: #0558e1;
font-size: 18px;
padding-bottom: 0;
border-bottom: 0;
}
.title:before {
content: "";
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
background: #0558e1;
vertical-align: middle;
margin-right: 10px;
margin-top: 6px;
}
}
}
::v-deep .agreeOr > div {
display: flex;
align-items: center;
.el-input {
margin-right: 10px;
margin-left: 32px;
}
}
::v-deep .agreeOr > div:last-of-type {
margin-top: 15px;
}
.blueAll {
::v-deep .el-radio-button__inner {
width: 80px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
background: #ffffff;
color: #0558e1;
border: 1px solid #0558e1;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
box-shadow: unset !important;
background: #0558e1;
color: #ffffff;
}
}
.inputBule {
width: 55px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
background: #0558e1;
color: #ffffff;
border: 1px solid #0558e1;
}
.redAll {
margin-left: 10px;
::v-deep .el-radio-button__inner {
width: 80px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
border: 1px solid #e83a48;
background: #ffffff;
color: #e83a48;
margin-left: 10px;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
box-shadow: unset !important;
color: #ffffff;
background: #e83a48;
}
}
.blueInput {
width: 55px;
}
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-28 16:52:46 * @LastEditTime: 2022-06-29 16:59:49
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -45,9 +45,9 @@
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// 开发 // 开发
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797'; window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796'; window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/'; window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本 // 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797'; // window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 19:19:40 * @Date: 2022-04-01 19:19:40
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 18:59:03 * @LastEditTime: 2022-06-29 14:34:24
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -114,7 +114,7 @@ export function lastestPage(params) {
// //
export function submitApply(data) { export function submitApply(data) {
return request({ return request({
url: '/ability/center/apply', url: '/ability/center/v2/apply',
method: 'post', method: 'post',
data, data,
}) })

View File

@ -10,7 +10,7 @@
<span></span> <span></span>
{{ item.deptName }} {{ item.deptName }}
</div> </div>
<template v-for="val in item.children" :key="val.resourceId"> <template v-for="val in item.arr" :key="val.resourceId">
<div class="item"> <div class="item">
<div class="name"> <div class="name">
<span>{{ val.resourceName }}</span> <span>{{ val.resourceName }}</span>
@ -48,11 +48,9 @@
// //
const removeFunction = (data) => { const removeFunction = (data) => {
dataForm.value.map((val) => { dataForm.value.map((val) => {
val.children = val.children.filter( val.arr = val.arr.filter((item) => item.resourceId !== data.resourceId)
(item) => item.resourceId !== data.resourceId
)
}) })
dataForm.value = dataForm.value.filter((val) => val.children.length !== 0) dataForm.value = dataForm.value.filter((val) => val.arr.length !== 0)
} }
</script> </script>

View File

@ -20,6 +20,18 @@
labelAlign="left" labelAlign="left"
autocomplete="off" autocomplete="off"
> >
<div class="base-info">
<a-form-item
label="申请标题"
name="title"
:rules="[{ required: true, message: '请输入申请标题' }]"
>
<a-input
placeholder="请输入能力申请标题"
v-model:value="formName.title"
/>
</a-form-item>
</div>
<div class="base-info"> <div class="base-info">
<a-form-item <a-form-item
label="申请人信息" label="申请人信息"
@ -59,71 +71,71 @@
<a-input <a-input
placeholder="请输入单位" placeholder="请输入单位"
v-model:value="formName.unit" v-model:value="formName.unit"
disabled
/> />
</a-form-item> </a-form-item>
</div> </div>
<div class="base-info">
<a-form-item <a-form-item
style="margin-bottom: 10px" label="应用系统"
label="申请应用" name="applicationSystem"
name="system" :rules="[{ required: true, message: '请选择应用系统' }]"
:rules="[{ required: true, message: '请输入申请应用' }]"
> >
<a-tooltip placement="top"> <a-select
<template #title> v-model:value="formName.applicationSystem"
<span>{{ formName.formNameSystem }}</span> show-search
</template> placeholder="请选择应用系统"
<a-input style="width: 200px"
style="width: 350px; background-color: #f5f5f5" :options="systemOptions"
v-model:value="formName.formNameSystem" @focus="handleFocus"
:disabled="disabled" @blur="handleBlur"
/> @change="systemHandleChange"
<span style="width: 350px; background-color: #f5f5f5"></span> @search="systemHandleSearch"
</a-tooltip> ></a-select>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
style="margin-bottom: 10px" class="applicationScene"
label="应用场景" label="应用场景"
name="scene" name="applicationScene"
:rules="[{ required: true, message: '请输入应用场景' }]" :rules="[{ required: true, message: '请选择应用场景' }]"
style="width: 6.93rem"
> >
<a-textarea <a-select
style=" v-model:value="formName.applicationScene"
width: 500px; :options="applicationSceneOpthion"
height: 150px; mode="tags"
font-size: 16px; :size="size"
line-height: 24px; placeholder="请选择应用场景"
color: #333; :filterOption="false"
border: 1px solid #e0e0e0; :searchValue="false"
resize: none; style="width: 5.87rem"
border-radius: 6px; ></a-select>
padding: 10px;
"
v-model:value="formName.scene"
/>
</a-form-item> </a-form-item>
</div>
<div>
<a-form-item <a-form-item
style="margin-bottom: 10px" label="应用背景"
label="申请依据" name="applicationBackground"
name="basis" :rules="[{ required: true, message: '请输入应用背景' }]"
:rules="[{ required: true, message: '请输入申请依据' }]"
> >
<a-textarea <a-input
style=" placeholder="请输入应用背景"
width: 500px; v-model:value="formName.applicationBackground"
height: 150px;
font-size: 16px;
line-height: 24px;
color: #333;
border: 1px solid #e0e0e0;
border-radius: 6px;
padding: 10px;
resize: none;
"
v-model:value="formName.basis"
/> />
</a-form-item> </a-form-item>
</div>
<div>
<a-form-item
label="期望效果"
name="effectWish"
:rules="[{ required: true, message: '请输入期望效果' }]"
>
<a-input
placeholder="请输入期望效果"
v-model:value="formName.effectWish"
/>
</a-form-item>
</div>
<a-form-item <a-form-item
style="color: #666; font-size: 16px" style="color: #666; font-size: 16px"
@ -206,11 +218,7 @@
<div> <div>
<img src="../../assets/home/success.png" alt="" /> <img src="../../assets/home/success.png" alt="" />
</div> </div>
<p> <p>您已成功申请能力,请耐心等待审批结果结果会第一时间通知您</p>
您已成功申请{{
formName.formNameSystem || ''
}},请耐心等待审批结果结果会第一时间通知您
</p>
</div> </div>
</div> </div>
</article> </article>
@ -238,8 +246,10 @@
relaunch, relaunch,
selectOne, selectOne,
} from '@/api/home' } from '@/api/home'
import { getCategoryTreePage } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { sgcDel, getApplyForm } from '@/api/personalCenter' import { sgcDel, getApplyForm } from '@/api/personalCenter'
import { pageWithAttrs } from '@/api/home'
// import { baseURL } from '@/config' // import { baseURL } from '@/config'
// import AsideMenu from './components/asideMenu.vue' // import AsideMenu from './components/asideMenu.vue'
@ -257,16 +267,18 @@
const disabled = ref(false) const disabled = ref(false)
const baseURL = window.SITE_CONFIG.apiURL const baseURL = window.SITE_CONFIG.apiURL
let record = ref('1') let record = ref('1')
const text = ref('')
const formName = reactive({ const formName = reactive({
title: '', //
applicationSystem: [], //
applicationScene: [], //
applicationBackground: '', //
effectWish: '', //
user: '', user: '',
userId: '', userId: '',
phone: '', phone: '',
unit: '', unit: '',
area: '',
system: [], system: [],
scene: '',
basis: '',
formNameSystem: '',
enclosure: '', // enclosure: '', //
}) })
const dataList = ref([]) const dataList = ref([])
@ -294,7 +306,21 @@
// console.log('================>', res, formName.phone) // console.log('================>', res, formName.phone)
}) })
} }
const applicationSceneOpthion = ref([])
getCategoryTreePage({
page: 1,
limit: 20,
dictTypeId: '1513712507692818433',
deFlage: 0,
}).then((res) => {
res.data.data.list.map((val) => {
applicationSceneOpthion.value.push({
value: val.dictLabel,
label: val.dictLabel,
})
})
// console.log('========>', applicationSceneOpthion.value)
})
// console.log(formName.system) // console.log(formName.system)
const formRef = ref() const formRef = ref()
const applySuccess = ref(true) const applySuccess = ref(true)
@ -350,6 +376,31 @@
if (!formName) { if (!formName) {
return message.error('请设置表单名称') return message.error('请设置表单名称')
} }
let ids = []
formName.system = []
list.value.map((val) => {
val.arr.map((item) => {
formName.system.push({
resourceId: item.resourceId,
resourceName: item.resourceName,
})
console.log(item.id)
ids.push(item.id)
})
})
console.log('提交数据==========================>', formName, ids)
submitApply(formName).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')
}
})
}
})
// if (arr && arr.length !== 0) { // if (arr && arr.length !== 0) {
// console.log('') // console.log('')
// const obj = ref({}) // const obj = ref({})
@ -480,6 +531,7 @@
label: '交通运输局', label: '交通运输局',
}, },
]) ])
const systemOptions = ref([])
const handleChange = (info) => { const handleChange = (info) => {
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
@ -538,6 +590,63 @@
// }) // })
// }) // })
// }) // })
//
const flag = ref(true)
const systemHandleChange = (value) => {
console.log(`selected ${value}`)
}
const systemHandleSearch = (value) => {
console.log(`search ${value}`)
text.value = value
systemOptions.value = []
window.setTimeout(() => {
if (flag.value && text.value == value && text.value !== '') {
console.log('1秒未输入~~~~~~~~~~~~~~~~~~~~~~~~~~')
pageWithAttrs({
pageNum: 99999,
pageSize: 5,
type: '应用资源',
name: text.value,
infoList: [],
}).then((res) => {
if (res.data.code == 0) {
if (res.data.data.records.length == 0) {
message.warning('该关键词,暂无应用资源!')
} else {
res.data.data.records.map((val) => {
systemOptions.value.push({
value: val.name,
label: val.name,
})
})
console.log(
'第一次获取===================>',
systemOptions.value
)
}
} else {
message.error('获取数据失败!')
}
})
}
}, 500)
}
const handleBlur = () => {
console.log('blur')
flag.value = false
}
const handleFocus = () => {
console.log('focus')
flag.value = true
systemOptions.value = []
}
// const filterOption = (input, option) => {
// return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
// }
onBeforeUnmount(() => { onBeforeUnmount(() => {
mybus.off('reomveOldData') mybus.off('reomveOldData')
}) })
@ -561,6 +670,12 @@
baseURL, baseURL,
beforeUpload, beforeUpload,
dataList, dataList,
systemHandleChange,
systemHandleSearch,
handleBlur,
handleFocus,
systemOptions,
applicationSceneOpthion,
} }
}, },
} }
@ -599,6 +714,7 @@
} }
.base-info { .base-info {
display: flex; display: flex;
justify-content: space-between;
} }
:deep(.ant-form-item-label) { :deep(.ant-form-item-label) {
label { label {
@ -631,4 +747,12 @@
color: #000; color: #000;
} }
} }
.applicationScene {
:deep(.ant-select-selector) {
overflow-x: scroll;
}
:deep(.ant-select-selection-overflow) {
flex-wrap: nowrap;
}
}
</style> </style>

View File

@ -513,6 +513,8 @@
} }
val.checked = true val.checked = true
}) })
} else {
getListByDeptId(item)
} }
item.checkAll = true item.checkAll = true
checkedList.value.push(item.deptId) checkedList.value.push(item.deptId)
@ -665,11 +667,18 @@
// } // }
// } // }
// }) // })
if (checkedList.value.length == 0) { if (checkedListAbility.value.length == 0) {
message.error('请先选择需要申请的数据!') message.error('请先选择需要申请的数据!')
} else { } else {
// console.log('===================>', list.value) let arr = []
localStorage.setItem('applyList', JSON.stringify(list.value)) list.value.map((val) => {
val.arr = val.children.filter(
(item) => checkedListAbility.value.indexOf(item.resourceId) > -1
)
})
arr = list.value.filter((val) => val.arr.length !== 0)
console.log('一键申请===================>', arr)
localStorage.setItem('applyList', JSON.stringify(arr))
router.push({ router.push({
path: '/apply', path: '/apply',
}) })