Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
wuhongjian 2022-06-23 21:16:15 +08:00
commit cdaef52145
12 changed files with 818 additions and 159 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-11 10:11:40 * @Date: 2022-04-11 10:11:40
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 17:19:39 * @LastEditTime: 2022-06-23 18:30:45
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -27,9 +27,9 @@
'isTab': true, // 是否通过tab展示内容? 'isTab': true, // 是否通过tab展示内容?
'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配) 'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
}; };
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/#/vueTemplateDemo'; window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo';
window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9797/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9797/#/vueTemplateDemo';
window.SITE_CONFIG['menuList'] = []; // 左侧菜单列表(后台返回,未做处理) window.SITE_CONFIG['menuList'] = []; // 左侧菜单列表(后台返回,未做处理)
window.SITE_CONFIG['permissions'] = []; // 页面按钮操作权限(后台返回,未做处理) window.SITE_CONFIG['permissions'] = []; // 页面按钮操作权限(后台返回,未做处理)
@ -42,7 +42,8 @@
<% 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://15.2.21.238: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.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';
@ -71,7 +72,8 @@
// 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['apiURL'] = 'http://15.72.183.90:8000/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// WebSocket地址 // WebSocket地址
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket'; window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,97 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-11 16:30:04
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-06 13:14:02
* @Description: 告诉大家这是什么
-->
<template>
<div shadow="never" class="aui-card--fill">
<!-- 流转详情 -->
<h3 class="titleH3">{{ $t('process.circulation') }}</h3>
<div class="mod-sys__dict">
<el-table
v-loading="dataListLoading"
:data="dataList"
border
@selection-change="dataListSelectionChangeHandle"
@sort-change="dataListSortChangeHandle"
style="width: 100%;">
<!-- 任务名称 -->
<el-table-column prop="activityName" :label="$t('process.taskName')" header-align="center" align="center"></el-table-column>
<!-- 处理人 -->
<el-table-column prop="assigneeName" :label="$t('process.assignee')" header-align="center" align="center"></el-table-column>
<!-- 流程开始时间 -->
<el-table-column prop="startTime" :label="$t('task.startTime')" header-align="center" align="center"></el-table-column>
<!-- 流程结束时间 -->
<el-table-column prop="endTime" :label="$t('task.endTime')" header-align="center" align="center"></el-table-column>
<!-- 审核意见 -->
<el-table-column prop="comment" :label="$t('process.comment')" header-align="center" align="center"></el-table-column>
<!-- 任务时长 -->
<el-table-column prop="durationInSeconds" :label="$t('task.durationInSeconds')" header-align="center" align="center" width="180"></el-table-column>
</el-table>
<el-pagination
v-if="dataForm.pid === '0'"
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</div>
</template>
<style scoped>
.image {
width: 60%;
display: block;
margin: 0 auto 30px auto;
}
.titleH3{
font-size: 16px;
color: #212121;
padding:20px 0;
margin-bottom:0;
}
</style>
<script>
import Cookies from 'js-cookie'
import qs from 'qs'
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
name: 'RenProcessDetail',
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/act/his/getTaskHandleDetailInfo',
getDataListIsPage: false,
createdIsNeed: false,
deleteIsBatch: true,
deleteIsBatchKey: 'deploymentId'
},
dataForm: {
processInstanceId: ''
}
}
},
created () {
this.dataForm.processInstanceId = this.$route.params.processInstanceId
this.getResourceURL()
this.getDataList()
},
methods: {
// (xml/image)url
getResourceURL () {
const params = qs.stringify({
token: Cookies.get('ucsToken'),
processInstanceId: this.dataForm.processInstanceId
})
return `${window.SITE_CONFIG.apiURL}/act/his/getInstImage?${params}`
}
}
}
</script>

View File

@ -1,106 +1,134 @@
<!-- 流程业务表单 --> <!-- 流程业务表单 -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<el-form
:model="dataForm" <!-- 申请人详情 -->
:rules="dataRule" <div>
ref="dataForm" <h3>申请人信息</h3>
@keyup.enter.native="dataFormSubmitHandle()" <div class="big-BOX">
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" <p>
> <span>申请人<span> {{dataForm.content.applyUserName || '--'}}</span></span>
<el-form-item label="申请人" prop="user"> <span>电话<span>{{dataForm.content.applyUserPhone || '--'}}</span></span>
<el-input <span>单位<span>{{dataForm.content.applyUserDeptName || '--'}}</span></span>
v-model="dataForm.applyUserName" </p>
:disabled="fieldDisabled" <p>
placeholder="请输入申请人" <span>应用领域<span>{{dataForm.content.detailsField || '--'}}</span></span>
></el-input> <span> 需求类型<span> {{dataForm.content.detailsType || '--'}}</span></span>
</el-form-item> <span> 需求标题 <span> {{dataForm.content.demandSubject || '--'}}</span></span>
<el-form-item label="申请电话" prop="phone"> </p>
<el-input <p>
v-model="dataForm.applyUserPhone" <span> 需求描述<span> {{dataForm.content.demandDetails|| '--'}}</span></span>
:disabled="fieldDisabled" </p>
placeholder="请输入申请人电话" <p>
></el-input> <span> 申请附件<span> {{dataForm.content.enclosure|| '--'}}<button @click="downloadFile(dataForm.content.enclosure)">下载</button></span></span>
</el-form-item>
<el-form-item label="申请单位" prop="unit"> </p>
<el-input </div>
v-model="dataForm.applyUserDeptName" </div>
:disabled="fieldDisabled"
placeholder="请输入申请单位" <!-- 申请能力 -->
></el-input> <div class="AbilityApply">
</el-form-item> <h3>申请能力</h3>
<el-form-item label="需求标题" prop="area"> <ul v-for="item in dataList" :key="item.id">
<el-input <li class="title">{{item.address}}</li>
v-model="dataForm.demandSubject" <li class="clearfix">
:disabled="fieldDisabled" <img
placeholder="需求标题" src="~@/assets/img/imgLeft.png"
></el-input> />
</el-form-item> <div>
<el-form-item label="需求类型" prop="system"> <h2>{{item.name}}<span>{{item.type}}</span></h2>
<el-input <p>{{item.describe}}</p>
v-model="dataForm.detailsType" </div>
:disabled="fieldDisabled" </li>
placeholder="需求类型" </ul>
></el-input> </div>
</el-form-item>
<el-form-item label="应用领域" prop="scene">
<el-input
v-model="dataForm.detailsField"
:disabled="fieldDisabled"
placeholder="应用领域"
></el-input>
</el-form-item>
<el-form-item label="需求描述" prop="basis">
<el-tooltip class="item" effect="dark" popper-class="kuandukuandukuandu" :content="dataForm.demandDetails" placement="top">
<el-input
v-model="dataForm.demandDetails"
:disabled="fieldDisabled"
placeholder="需求描述"
></el-input>
</el-tooltip>
</el-form-item>
<el-form-item v-if="dataForm.enclosure" label="申请附件" prop="enclosure">
<el-button @click="downloadFile(dataForm.enclosure, '申请附件')">附件下载</el-button>
</el-form-item>
</el-form>
<!-- 流程综合组件 --> <!-- 流程综合组件 -->
<ren-process-multiple <!-- <ren-process-multiple
v-if="processVisible" v-if="processVisible"
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId" updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
saveFormUrl="/processForm/tabilityapplication" saveFormUrl="/processForm/tabilityapplication"
dataFormName="dataForm" dataFormName="dataForm"
ref="renProcessMultiple" ref="renProcessMultiple"
></ren-process-multiple> ></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> </el-card>
</template> </template>
<script> <script>
// //
import processModule from '@/mixins/process-module' import processModule from '@/mixins/process-module'
import qs from 'qs'
import RenProcessDetailImport from '@/components/ren-process-detail/src/ren-process-detail-import'
export default { export default {
// //
mixins: [processModule], mixins: [processModule],
data () { data () {
return { return {
visible: false, visible: true,
// //
fieldDisabled: false, // fieldDisabled: false,
// dataForm: {
// id: '',
// user: '',
// phone: '',
// unit: '',
// area: '',
// system: '',
// scene: '',
// basis: ''
// }
dataForm: { dataForm: {
id: '', id: '',
user: '', content: []
phone: '', },
unit: '', dataList: [
area: '', {
system: '', // img: '~@/assets/img/imgLeft.png',
scene: '', address: '青岛市应急管理局',
basis: '' name: '组件名称',
} type: '组件服务',
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
},
{
// img: '~@/assets/img/imgLeft.png',
address: '青岛市应急管理局',
name: '组件名称',
type: '组件服务',
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
},
{
// img: '~@/assets/img/imgLeft.png',
address: '青岛市应急管理局',
name: '组件名称',
type: '组件服务',
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
}
],
inputAgree: '',
inputNo: '',
agreeOrList: '同意'
} }
}, },
created () { created () {
// KEY // KEY
this.dataForm.id = this.$route.params.businessKey this.dataForm.id = this.$route.params.businessKey
console.log(this.$route.params) console.log(this.dataForm, 'ela')
this.init() this.init()
// //
var callbacks = { var callbacks = {
@ -115,37 +143,30 @@ export default {
this.initProcessMultiple(callbacks) this.initProcessMultiple(callbacks)
}, },
computed: { computed: {
dataRule () { // dataRule () {
return { // return {
user: [{ required: true, message: '请输入申请人', trigger: 'blur' }], // inputAgree: [
phone: [ // { required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '请输入申请人电话', trigger: 'blur' }, // ],
{ // inputNo: [
type: 'string', // { required: true, message: this.$t('validate.required'), trigger: 'blur' }
pattern: /^1[3456789]\d{9}$/, // ]
message: '请输入正确的电话号码', // }
trigger: 'blur' // }
} },
], components: {
unit: [{ required: true, message: '请输入申请单位', trigger: 'blur' }], RenProcessDetailImport
area: [{ required: true, message: '请输入所在地区', trigger: 'blur' }],
system: [
{ required: true, message: '请输入申请应用', trigger: 'blur' }
],
scene: [{ required: true, message: '请输入应用场景', trigger: 'blur' }],
basis: [{ required: true, message: '请输入申请依据', trigger: 'blur' }]
}
}
}, },
methods: { methods: {
init () { init () {
this.visible = true // this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.dataForm.resetFields() // this.$refs.dataForm.resetFields()
if (this.dataForm.id) { if (this.dataForm.id) {
// KEY // KEY
this.fieldDisabled = true // this.fieldDisabled = true
this.getInfo() this.getInfo()
console.log(this.dataForm, 'init')
} }
}) })
}, },
@ -155,21 +176,242 @@ export default {
.get(`/demanData/${this.dataForm.id}`) .get(`/demanData/${this.dataForm.id}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
console.log(res.data)
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.dataForm = { console.log(res.data, 'elas')
...this.dataForm, this.dataForm.content = res.data
...res.data console.log(this.dataForm, 'ela')
}
}) })
.catch(() => {}) .catch(() => {})
}, },
//
applyData () {
this.$http
.get(`/resource/select/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
console.log(res.data, 'wh')
// return this.$message.error(res.msg)
}
// console.log(res.data, 'elas')
// this.dataForm.content = res.data
// console.log(this.dataForm, 'ela')
})
.catch(() => {})
},
// 退
agreeOrNot () {
if (this.agreeOrList === '同意') {
console.log('this.dataForm', this.dataForm)
const params = qs.stringify({
taskId: this.dataForm.content.instanceId,
comment: this.inputAgree
})
console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
if (res.code !== 0) {
console.log(res)
this.$message.error(res.msg)
}
}).catch(() => {})
} else if (this.agreeOrList === '退回') {
const params = qs.stringify({
taskId: this.dataForm.content.instanceId,
comment: this.inputNo
})
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
}
})
}
},
// //
startProcessErrorCallback (data) { startProcessErrorCallback (data) {
console.log(data) console.log(data)
}, },
// //
taskHandleErrorCallback (data) {} taskHandleErrorCallback (data) {}
},
mounted () {
this.applyData()
} }
} }
</script> </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:78%;
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;
}
}
}
p:last-of-type{
margin-top:16px;
width:100%;
span{
display:flex;
span{
padding-left: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:#0558e1;
color:#ffffff;
border:1px solid #0558e1;
}
}
.inputBule{
width:55px;
height:32px;
line-height:32px;
padding:0;
border-radius:2px;
background:#0558e1;
color:#ffffff;
border:1px solid #0558e1;
}
::v-deep .is-active{
background:#ffffff;
color:#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__inner{
box-shadow: unset;
}
}
.blueInput{
width:55px;
}
</style>

View File

@ -0,0 +1,175 @@
<!-- 流程业务表单 -->
<template>
<el-card shadow="never" class="aui-card--fill">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"
>
<el-form-item label="申请人" prop="user">
<el-input
v-model="dataForm.applyUserName"
:disabled="fieldDisabled"
placeholder="请输入申请人"
></el-input>
</el-form-item>
<el-form-item label="申请电话" prop="phone">
<el-input
v-model="dataForm.applyUserPhone"
:disabled="fieldDisabled"
placeholder="请输入申请人电话"
></el-input>
</el-form-item>
<el-form-item label="申请单位" prop="unit">
<el-input
v-model="dataForm.applyUserDeptName"
:disabled="fieldDisabled"
placeholder="请输入申请单位"
></el-input>
</el-form-item>
<el-form-item label="需求标题" prop="area">
<el-input
v-model="dataForm.demandSubject"
:disabled="fieldDisabled"
placeholder="需求标题"
></el-input>
</el-form-item>
<el-form-item label="需求类型" prop="system">
<el-input
v-model="dataForm.detailsType"
:disabled="fieldDisabled"
placeholder="需求类型"
></el-input>
</el-form-item>
<el-form-item label="应用领域" prop="scene">
<el-input
v-model="dataForm.detailsField"
:disabled="fieldDisabled"
placeholder="应用领域"
></el-input>
</el-form-item>
<el-form-item label="需求描述" prop="basis">
<el-tooltip class="item" effect="dark" popper-class="kuandukuandukuandu" :content="dataForm.demandDetails" placement="top">
<el-input
v-model="dataForm.demandDetails"
:disabled="fieldDisabled"
placeholder="需求描述"
></el-input>
</el-tooltip>
</el-form-item>
<el-form-item v-if="dataForm.enclosure" label="申请附件" prop="enclosure">
<el-button @click="downloadFile(dataForm.enclosure, '申请附件')">附件下载</el-button>
</el-form-item>
</el-form>
<!-- 流程综合组件 -->
<ren-process-multiple
v-if="processVisible"
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
saveFormUrl="/processForm/tabilityapplication"
dataFormName="dataForm"
ref="renProcessMultiple"
></ren-process-multiple>
</el-card>
</template>
<script>
//
import processModule from '@/mixins/process-module'
export default {
//
mixins: [processModule],
data () {
return {
visible: false,
//
fieldDisabled: false,
dataForm: {
id: '',
user: '',
phone: '',
unit: '',
area: '',
system: '',
scene: '',
basis: ''
}
}
},
created () {
// KEY
this.dataForm.id = this.$route.params.businessKey
console.log(this.$route.params)
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 {
user: [{ required: true, message: '请输入申请人', trigger: 'blur' }],
phone: [
{ required: true, message: '请输入申请人电话', trigger: 'blur' },
{
type: 'string',
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的电话号码',
trigger: 'blur'
}
],
unit: [{ required: true, message: '请输入申请单位', trigger: 'blur' }],
area: [{ required: true, message: '请输入所在地区', trigger: 'blur' }],
system: [
{ required: true, message: '请输入申请应用', trigger: 'blur' }
],
scene: [{ required: true, message: '请输入应用场景', trigger: 'blur' }],
basis: [{ required: true, message: '请输入申请依据', trigger: 'blur' }]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs.dataForm.resetFields()
if (this.dataForm.id) {
// KEY
this.fieldDisabled = true
this.getInfo()
}
})
},
//
getInfo () {
this.$http
.get(`/demanData/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
})
.catch(() => {})
},
//
startProcessErrorCallback (data) {
console.log(data)
},
//
taskHandleErrorCallback (data) {}
}
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -41,9 +41,12 @@
:key="index" :key="index"
@click="tabSwitch(item, index)" @click="tabSwitch(item, index)"
:class=" :class="
tabName == item.attrType (tabName == item.attrType
? 'assign-case-detail-page-content-left-border-click' ? 'assign-case-detail-page-content-left-border-click'
: '' : '') ||
(selectNow == item.id
? 'assign-case-detail-page-content-left-border-click'
: '')
" "
> >
{{ item.attrType }} {{ item.attrType }}
@ -175,7 +178,7 @@
) )
//tab //tab
const tabSwitch = (item, index) => { const tabSwitch = (item, index) => {
tabName.value = item.title tabName.value = item.attrType
if (index != 0 && index != 3) { if (index != 0 && index != 3) {
let top = let top =
document.querySelector( document.querySelector(

View File

@ -168,6 +168,7 @@
tabClickShow.value = true tabClickShow.value = true
} else { } else {
let list = [] let list = []
listBg.value = ''
init(list) init(list)
tabClickShow.value = false tabClickShow.value = false
} }

View File

@ -128,6 +128,7 @@
width: 7.2rem; width: 7.2rem;
color: #fff; color: #fff;
margin-right: 0.8rem; margin-right: 0.8rem;
margin-top: -0.3rem;
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
@ -135,10 +136,11 @@
font-size: 14px; font-size: 14px;
} }
.name { .name {
// max-width: 330px; display: inline-block;
width: 10.2rem;
// overflow: hidden; // overflow: hidden;
// text-overflow: ellipsis; // text-overflow: ellipsis;
white-space: nowrap; // white-space: nowrap;
font-size: 40px; font-size: 40px;
margin-right: 20px; margin-right: 20px;
} }

View File

@ -0,0 +1,125 @@
<template>
<div class="ability-to-apply-for">
<div class="title">申请能力</div>
<div
v-for="(item, index) in dataForm"
:key="index"
class="ability-to-apply-for-content"
>
<div class="dep-name">
<span></span>
{{ item.deptName }}
</div>
<div class="name">
<span>{{ item.name }}</span>
<span>{{ item.type }}</span>
</div>
<div class="description">{{ item.description }}</div>
<div class="remove" @click="removeFunction(item)"></div>
</div>
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
import { ref, defineProps } from 'vue'
import mybus from '@/myplugins/mybus'
const props = defineProps({
dataList: { type: Array, default: null },
})
let dataForm = ref([])
dataForm.value = props.dataList
const router = useRouter()
const arr =
router.currentRoute.value.query.name instanceof Array
? router.currentRoute.value.query.name
: [router.currentRoute.value.query.name]
const dataResourceId = router.currentRoute.value.query.resourceId
const depList = ref({
Name: [],
depID: [],
})
//
const removeFunction = (data) => {
props.dataList.map((item, index) => {
if (item.name == data.name) {
arr.splice(arr.indexOf(data.name), 1)
dataResourceId.splice(dataResourceId.indexOf(data.id), 1)
depList.value.depID = dataResourceId
depList.value.Name = arr
dataForm.value.splice(index, 1)
mybus.emit('reomveOldData', depList.value)
console.log('depList.value', depList.value)
}
})
}
</script>
<style scoped lang="less">
.ability-to-apply-for {
.title {
font-size: 0.16rem;
color: #212121;
border-bottom: 0.01rem #dddee1 solid;
padding-bottom: 0.1rem;
margin-bottom: 0.2rem;
}
.ability-to-apply-for-content {
margin-bottom: 0.3rem;
border-bottom: 0.01rem #dddee1 solid;
padding-bottom: 0.3rem;
padding-right: 0.5rem;
position: relative;
.dep-name {
color: #0558e1;
font-size: 0.18rem;
display: flex;
align-items: center;
line-height: 0.18rem;
margin-bottom: 0.2rem;
span {
display: inline-block;
width: 0.05rem;
height: 0.05rem;
background: #0558e1;
border-radius: 0.05rem;
margin-right: 0.05rem;
}
}
.name {
margin-bottom: 0.2rem;
span:first-child {
display: inline-block;
margin-right: 0.08rem;
font-size: 0.2rem;
color: #000000;
}
span:last-child {
display: inline-block;
padding: 0 0.05rem;
background: #00b8e6;
color: #fff;
}
}
.description {
color: rgba(0, 0, 0, 0.45);
}
.remove {
width: 0.32rem;
height: 0.32rem;
position: absolute;
right: 0;
top: 50%;
margin-top: -0.16rem;
background: url('~@/assets/home/remove.png') no-repeat;
background-size: cover;
cursor: pointer;
}
.remove:hover {
background: url('~@/assets/home/remove-hover.png') no-repeat;
background-size: cover;
}
}
}
</style>

View File

@ -6,9 +6,11 @@
<aside-menu></aside-menu> <aside-menu></aside-menu>
</aside> --> </aside> -->
<article> <article>
<div class="from-card" v-if="applySuccess">
<AbilityToApplyFor :dataList="dataList"></AbilityToApplyFor>
</div>
<div class="form-container"> <div class="form-container">
<div v-if="applySuccess"> <div v-if="applySuccess">
<div class="title">基础信息</div>
<a-form <a-form
ref="formRef" ref="formRef"
:model="formName" :model="formName"
@ -20,7 +22,7 @@
> >
<div class="base-info"> <div class="base-info">
<a-form-item <a-form-item
label="申请人" label="申请人信息"
name="user" name="user"
:rules="[{ required: true, message: '请输入申请人' }]" :rules="[{ required: true, message: '请输入申请人' }]"
> >
@ -33,7 +35,7 @@
<a-form-item <a-form-item
style="margin: 0 22px" style="margin: 0 22px"
label="申请人电话" label="电话"
name="phone" name="phone"
:rules="[ :rules="[
{ {
@ -50,31 +52,16 @@
</a-form-item> </a-form-item>
<a-form-item <a-form-item
label="申请单位" label="单位"
name="unit" name="unit"
:rules="[{ required: true, message: '请输入申请单位' }]" :rules="[{ required: true, message: '请输入单位' }]"
> >
<a-input <a-input
placeholder="请输入申请单位" placeholder="请输入单位"
v-model:value="formName.unit" v-model:value="formName.unit"
/> />
</a-form-item> </a-form-item>
</div> </div>
<!-- <a-form-item
label="所在地区"
name="area"
:rules="[{ required: true, message: '请输入所在地区' }]"
>
<a-input
style="width: 230px"
placeholder="请输入所在地区"
v-model:value="formName.area"
/>
</a-form-item> -->
<div class="title">更多申请信息</div>
<a-form-item <a-form-item
style="margin-bottom: 10px" style="margin-bottom: 10px"
label="申请应用" label="申请应用"
@ -146,7 +133,7 @@
<a-upload <a-upload
v-model:file-list="fileList" v-model:file-list="fileList"
name="file" name="file"
:action="`${window.SITE_CONFIG.apiURL}/upload`" :action="`${baseURL}/upload`"
:headers="headers" :headers="headers"
@change="handleChange" @change="handleChange"
:before-upload="beforeUpload" :before-upload="beforeUpload"
@ -232,8 +219,9 @@
</template> </template>
<script> <script>
import AbilityToApplyFor from './AbilityToApplyFor.vue'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { reactive, ref } from 'vue' import { reactive, ref, watch, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import qs from 'qs' import qs from 'qs'
@ -248,6 +236,7 @@
getUser, getUser,
getUserInfo, getUserInfo,
relaunch, relaunch,
selectOne,
} from '@/api/home' } from '@/api/home'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { sgcDel, getApplyForm } from '@/api/personalCenter' import { sgcDel, getApplyForm } from '@/api/personalCenter'
@ -259,12 +248,15 @@
props: {}, props: {},
components: { components: {
HomeHeader, HomeHeader,
AbilityToApplyFor,
// AsideMenu, // AsideMenu,
// UploadOutlined, // UploadOutlined,
}, },
setup() { setup() {
const router = useRouter() const router = useRouter()
const disabled = ref(false) const disabled = ref(false)
const baseURL = window.SITE_CONFIG.apiURL
let record = ref('1')
const formName = reactive({ const formName = reactive({
user: '', user: '',
userId: '', userId: '',
@ -277,6 +269,7 @@
formNameSystem: '', formNameSystem: '',
enclosure: '', // enclosure: '', //
}) })
const dataList = ref([])
getUser().then((res) => { getUser().then((res) => {
formName.user = res.data.data.realName formName.user = res.data.data.realName
formName.userId = res.data.data.id formName.userId = res.data.data.id
@ -291,13 +284,19 @@
'router传参==================>', 'router传参==================>',
router.currentRoute.value.query.name router.currentRoute.value.query.name
) )
const arr = let arr =
router.currentRoute.value.query.name instanceof Array router.currentRoute.value.query.name instanceof Array
? router.currentRoute.value.query.name ? router.currentRoute.value.query.name
: [router.currentRoute.value.query.name] : [router.currentRoute.value.query.name]
console.log(router.currentRoute.value.query.ids) console.log(router.currentRoute.value.query.ids)
const ids = router.currentRoute.value.query.ids const ids = router.currentRoute.value.query.ids
const dataResourceId = router.currentRoute.value.query.resourceId 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 businessKey = ref(router.currentRoute.value.query.id)
const taskId = ref(router.currentRoute.value.query.taskId) const taskId = ref(router.currentRoute.value.query.taskId)
if (businessKey.value) { if (businessKey.value) {
@ -310,25 +309,8 @@
console.log('回填数据================>', res, formName.phone) console.log('回填数据================>', res, formName.phone)
}) })
} }
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],
})
})
console.log(formName.system)
console.log(formName.system)
const formRef = ref() const formRef = ref()
const applySuccess = ref(true) const applySuccess = ref(true)
// const rootObj = null // const rootObj = null
@ -545,6 +527,35 @@
return isPNG || Upload.LIST_IGNORE return isPNG || Upload.LIST_IGNORE
} }
const fileList = ref([]) 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],
})
})
})
onBeforeUnmount(() => {
mybus.off('reomveOldData')
})
return { return {
formRef, formRef,
formName, formName,
@ -561,8 +572,9 @@
handleChange, handleChange,
applySuccess, applySuccess,
disabled, disabled,
// baseURL, baseURL,
beforeUpload, beforeUpload,
dataList,
} }
}, },
} }
@ -570,7 +582,7 @@
<style scoped lang="less"> <style scoped lang="less">
#apply-container { #apply-container {
background-color: #f5f8fc; // background-color: #f5f8fc;
height: 100%; height: 100%;
width: 100%; width: 100%;
margin: 130px auto 0; margin: 130px auto 0;