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-07-18 15:39:25 +08:00
commit e1005536bb
13 changed files with 484 additions and 304 deletions

View File

@ -104,8 +104,17 @@ export default {
}) })
if (flag) { if (flag) {
const obj = {} const obj = {}
let sfFlag = false
list.forEach((item) => { list.forEach((item) => {
if (item.type === 'input2') { if (item.type === 'input2') {
sfFlag = this.data.filter(
(val) => val.type === this.numType
)[0]
if (sfFlag) {
this.$message.warning('已添加过该类型!')
return
}
obj[item.field] = obj[item.field] =
item.note1 + item.note1 +
(this.numType === '一次性买断' (this.numType === '一次性买断'
@ -121,7 +130,10 @@ export default {
obj[item.field] = item.note1 obj[item.field] = item.note1
} }
}) })
this.data.push(obj) if (!sfFlag) {
this.data.push(obj)
}
// this.data.push(obj)
this.$emit('changeInfoList', { this.$emit('changeInfoList', {
attrType: title, attrType: title,
attrValue: JSON.stringify(this.data), attrValue: JSON.stringify(this.data),

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-16 16:01:48 * @LastEditTime: 2022-07-18 14:09:10
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -49,7 +49,7 @@
window.SITE_CONFIG['backUrl'] = 'http://localhost:8001'; window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
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.238:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239: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,13 +1,13 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23 * @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-18 11:34:38 * @LastEditTime: 2022-07-18 15:07:32
* @Description: 数据资源参数配置 * @Description: 数据资源参数配置
*/ */
//const newLocation = 'qingdao' const newLocation = 'qingdao'
// const newLocation = 'baotou' // const newLocation = 'baotou'
const newLocation = 'xihaian' // const newLocation = 'xihaian'
// //
const whoShow = {} const whoShow = {}

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-18 11:23:39 * @LastEditTime: 2022-07-18 14:43:47
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -541,8 +541,16 @@
}) })
if (flag) { if (flag) {
let obj = {} let obj = {}
let sfFlag = false
list.forEach((item) => { list.forEach((item) => {
if (item.type === 'input2') { if (item.type === 'input2') {
sfFlag = data.value[title].filter(
(val) => val.type === numType.value
)[0]
if (sfFlag) {
message.warning('已添加过该类型!')
return
}
obj[item.field] = obj[item.field] =
item.note1 + item.note1 +
(numType.value == '一次性买断' (numType.value == '一次性买断'
@ -558,7 +566,9 @@
obj[item.field] = item.note1 obj[item.field] = item.note1
} }
}) })
data.value[title].push(obj) if (!sfFlag) {
data.value[title].push(obj)
}
// console.log(data.value[title]) // console.log(data.value[title])
mybus.emit('chageDataFrom', { mybus.emit('chageDataFrom', {
attrType: title, attrType: title,

View File

@ -6,7 +6,7 @@
* @Description: 应用详情 * @Description: 应用详情
--> -->
<template> <template>
<div class="algorithm-on-trial" v-if="flag"> <div class="algorithm-on-trial" v-if="flag && whoShow1.itShowQingDao">
<detals-title title="应用详情" type="PROBATION"></detals-title> <detals-title title="应用详情" type="PROBATION"></detals-title>
<div class="main"> <div class="main">
<div class="main-left"> <div class="main-left">
@ -35,14 +35,16 @@
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
let flag = ref(true) let flag = ref(true)
const whoShow1 = ref(whoShow)
console.log('whoShow1', whoShow1.value.itShowQingDao)
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
const dataFrom = ref({ const dataFrom = ref({
linkName: '访问地址', linkName: '访问地址',
link: 'http://localhost:8080/#/detailsfdddffffffffffffffdfgdfgdfdgdfgdfg', link: '',
numberName: '试用账号', numberName: '试用账号',
number: 'zhangfeihu', number: '',
passwordName: '试用密码', passwordName: '试用密码',
password: '**************************', password: '**************************',
password2: '', password2: '',
@ -52,15 +54,17 @@
if (obj !== '已申请') { if (obj !== '已申请') {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') { if (item.attrType == '试用用户名') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') { } else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue dataFrom.value.password2 = item.attrValue
} }
}) })
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
} }
} }
const clickLink = (link) => { const clickLink = (link) => {
@ -68,15 +72,19 @@
} }
// //
const copyFunction = (data, name) => { const copyFunction = (data, name) => {
let url = data if (data !== '') {
let oInput = document.createElement('input') let url = data
oInput.value = url let oInput = document.createElement('input')
document.body.appendChild(oInput) oInput.value = url
oInput.select() // ; document.body.appendChild(oInput)
console.log(oInput.value) oInput.select() // ;
document.execCommand('Copy') // console.log(oInput.value)
oInput.remove() // document.execCommand('Copy') //
message.success(name + '成功') oInput.remove() //
message.success(name + '成功')
} else {
message.error('复制为空')
}
} }
message.config({ message.config({
top: '100px', // top: '100px', //
@ -96,15 +104,17 @@
if (obj !== '已申请') { if (obj !== '已申请') {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') { if (item.attrType == '试用用户名') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') { } else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue dataFrom.value.password2 = item.attrValue
} }
}) })
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
} }
} }
} }

View File

@ -56,11 +56,19 @@
}, },
], ],
}) })
const whoShow1 = ref(whoShow)
// //
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
if (props.dataList.infoList) { if (props.dataList.infoList) {
if (!whoShow1.value.itShowQingDao) {
let obj = {
attrType: '访问地址',
attrValue: props.dataList.link || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if ( if (
item.attrType === '部署区域' || item.attrType === '部署区域' ||
@ -75,14 +83,13 @@
attrValue: '是', attrValue: '是',
} }
dataFrom.value.content[1].childrenContent.push(isAndNo) dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
attrValue: item.attrValue || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
} }
// } else if (item.attrType === '访') {
// let obj = {
// attrType: '访',
// attrValue: item.attrValue || '------',
// }
// dataFrom.value.content[0].childrenContent.push(obj)
// }
}) })
if (dataFrom.value.content[1].childrenContent.length <= 0) { if (dataFrom.value.content[1].childrenContent.length <= 0) {
let data = [ let data = [
@ -100,18 +107,25 @@
}) })
} }
} }
// //访 //访
// const addressFunction = (name, itemValue) => { const addressFunction = (name, itemValue) => {
// if (name == '访') { if (name == '访问地址') {
// window.open(itemValue) window.open(itemValue)
// } }
// } }
watch( watch(
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
dataFrom.value.content[0].childrenContent = [] dataFrom.value.content[0].childrenContent = []
dataFrom.value.content[1].childrenContent = [] dataFrom.value.content[1].childrenContent = []
if (!whoShow1.value.itShowQingDao) {
let obj = {
attrType: '访问地址',
attrValue: props.dataList.link || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if ( if (
item.attrType === '部署区域' || item.attrType === '部署区域' ||
@ -127,13 +141,6 @@
} }
dataFrom.value.content[1].childrenContent.push(isAndNo) dataFrom.value.content[1].childrenContent.push(isAndNo)
} }
// } else if (item.attrType === '访') {
// let obj = {
// attrType: '访',
// attrValue: item.attrValue || '------',
// }
// dataFrom.value.content[0].childrenContent.push(obj)
// }
}) })
if (dataFrom.value.content[1].childrenContent.length <= 0) { if (dataFrom.value.content[1].childrenContent.length <= 0) {
debugger debugger

View File

@ -58,6 +58,7 @@
key: 'common-problem', key: 'common-problem',
}, },
]) ])
const whoShow1 = ref(whoShow)
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
@ -100,13 +101,11 @@
list.value.push(item.attrType) list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') { } else if (item.attrType === '应用展示视频') {
list.value.push('应用展示') list.value.push('应用展示')
} else if (
item.attrType === '访问地址' &&
props.dataList.applyState === '已申请'
) {
list.value.push('应用详情')
} }
}) })
if (props.dataList.link && whoShow1.value.itShowQingDao) {
list.value.push('应用详情')
}
list.value.unshift('关联组件') list.value.unshift('关联组件')
list.value.push('部署与安全') list.value.push('部署与安全')
list.value.push('归属部门与服务商') list.value.push('归属部门与服务商')
@ -146,13 +145,11 @@
list.value.push(item.attrType) list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') { } else if (item.attrType === '应用展示视频') {
list.value.push('应用展示') list.value.push('应用展示')
} else if (
item.attrType === '访问地址' &&
props.dataList.applyState === '已申请'
) {
list.value.push('应用详情')
} }
}) })
if (props.dataList.link && whoShow1.value.itShowQingDao) {
list.value.push('应用详情')
}
list.value.unshift('关联组件') list.value.unshift('关联组件')
list.value.push('部署与安全') list.value.push('部署与安全')
list.value.push('归属部门与服务商') list.value.push('归属部门与服务商')

View File

@ -21,6 +21,8 @@
:class=" :class="
val.type == '基础设施' val.type == '基础设施'
? 'sxt' ? 'sxt'
: val.type == '应用资源'
? 'yyzy'
: val.componentType == '智能算法' : val.componentType == '智能算法'
? 'znsf' ? 'znsf'
: val.componentType == '图层服务' : val.componentType == '图层服务'
@ -103,7 +105,7 @@
]) ])
// eslint-disable-next-line vue/no-setup-props-destructure // eslint-disable-next-line vue/no-setup-props-destructure
dataForm.value = props.dataList dataForm.value = props.dataList
console.log(dataForm.value) console.log('=========================>', dataForm.value)
// const router = useRouter() // const router = useRouter()
// const arr = // const arr =
// router.currentRoute.value.query.name instanceof Array // router.currentRoute.value.query.name instanceof Array
@ -259,6 +261,10 @@
background: url('~@/assets/home/sxt_square.png') no-repeat; background: url('~@/assets/home/sxt_square.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.yyzy {
background: url('~@/assets/home/yyzy_square.png') no-repeat;
background-size: 100%;
}
.znsf { .znsf {
background: url('~@/assets/home/znsf_square.png') no-repeat; background: url('~@/assets/home/znsf_square.png') no-repeat;

View File

@ -96,7 +96,10 @@
/> />
</div> </div>
</div> </div>
<div class="top-content" v-if="Cardsname == '组件服务'"> <div
class="top-content"
v-if="Cardsname == '组件服务' || Cardsname == '应用资源'"
>
<span class="top-content-title">共享条件</span> <span class="top-content-title">共享条件</span>
<div class="leixingsumfather"> <div class="leixingsumfather">
<div class="leixingsum"> <div class="leixingsum">

View File

@ -75,7 +75,7 @@
/> />
</a-form-item> </a-form-item>
</div> </div>
<div class="base-info"> <div class="base-info" v-if="flag">
<a-form-item <a-form-item
label="应用系统" label="应用系统"
name="applicationSystem" name="applicationSystem"
@ -267,9 +267,22 @@
setup() { setup() {
const router = useRouter() const router = useRouter()
const disabled = ref(false) const disabled = ref(false)
const flag = ref(false)
const list = ref(JSON.parse(localStorage.getItem('applyList'))) const list = ref(JSON.parse(localStorage.getItem('applyList')))
const num = ref(0) const num = ref(0)
list.value.map((item) => { list.value.map((item) => {
item.arr.map((val) => {
console.log(item, '组件===========================')
let obj = item.children
? item.children.filter((type) => type.id == val.id)[0]
: val.type !== '应用资源'
if (obj) {
console.log('11111111111111111111111111111', obj, flag.value)
if (obj.type !== '应用资源') {
flag.value = true
}
}
})
if (item.checkedList) { if (item.checkedList) {
console.log(item) console.log(item)
num.value += Number(item.checkedList.length) num.value += Number(item.checkedList.length)
@ -290,9 +303,7 @@
? list.value[0].children ? list.value[0].children
.filter((val) => val.id == list.value[0].checkedList[0])[0] .filter((val) => val.id == list.value[0].checkedList[0])[0]
.resourceName.concat( .resourceName.concat(
list.value[0].checkedList.length > 1 num.value > 1 ? '等能力申请' + num.value + '个' : '能力申请'
? '等能力申请' + num.value + '个'
: '能力申请'
) )
: list.value[0].arr[0].resourceName.concat('能力申请'), // : list.value[0].arr[0].resourceName.concat('能力申请'), //
applicationSystem: [], // applicationSystem: [], //
@ -656,6 +667,7 @@
handleFocus, handleFocus,
systemOptions, systemOptions,
applicationSceneOpthion, applicationSceneOpthion,
flag,
} }
}, },
} }

View File

@ -30,7 +30,6 @@
@click="changeCondition(item.value)" @click="changeCondition(item.value)"
v-show=" v-show="
item.show && item.show &&
!(item.name === '申请量' && selectCardsname == '应用资源') &&
item.name !== '评分' && item.name !== '评分' &&
selectCardsname !== '数据资源' selectCardsname !== '数据资源'
" "
@ -115,7 +114,7 @@
p-id="3062" p-id="3062"
width="40" width="40"
height="40" height="40"
v-if="item.applyState == '通过' && item.type !== '应用资源'" v-if="item.applyState == '通过'"
style="margin-left: 10px" style="margin-left: 10px"
> >
<path <path
@ -190,9 +189,9 @@
</div> </div>
<div <div
v-if=" v-if="
selectCardsname !== '应用资源' &&
selectCardsname !== '数据资源' && selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务' selectCardsname !== '融合服务' &&
(selectCardsname !== '应用资源' || whoShow1.itShowQingDao)
" "
> >
申请量{{ item.applyCount || 0 }} 申请量{{ item.applyCount || 0 }}
@ -221,7 +220,12 @@
</div> </div>
<div class="right" v-if="selectCardsname !== '基础设施'"> <div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey"> <div class="shopping" :key="shoppingKey">
<template v-if="selectCardsname == '组件服务'"> <template
v-if="
selectCardsname == '组件服务' ||
(selectCardsname == '应用资源' && whoShow1.itShowQingDao)
"
>
<span <span
class="shopping-down" class="shopping-down"
v-if="item.isInShoppingCart" v-if="item.isInShoppingCart"
@ -279,7 +283,10 @@
<a-button <a-button
type="primary" type="primary"
@click="toView('apply', item)" @click="toView('apply', item)"
v-show="cardType == '组件服务'" v-show="
cardType == '组件服务' ||
(cardType == '应用资源' && whoShow1.itShowQingDao)
"
> >
{{ {{
item.shareCondition == '免批申请' ? '免批申请' : '立即申请' item.shareCondition == '免批申请' ? '免批申请' : '立即申请'
@ -542,9 +549,14 @@
resourceName: item.name, resourceName: item.name,
time: item.createDate, time: item.createDate,
type: item.type, type: item.type,
componentType: item.infoList.filter( componentType:
(val) => val.attrType == '组件类型' (item.infoList.filter(
)[0].attrValue, (val) => (val.attrType == '组件类型')[0]
) &&
item.infoList.filter(
(val) => val.attrType == '组件类型'
)[0].attrValue) ||
'',
}, },
], ],
deptId: item.deptId, deptId: item.deptId,
@ -1087,6 +1099,5 @@
text-overflow: ellipsis; text-overflow: ellipsis;
/*超出显示为省略号*/ /*超出显示为省略号*/
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all;
} }
</style> </style>

View File

@ -198,6 +198,8 @@
:class=" :class="
item.type == '基础设施' item.type == '基础设施'
? 'sxt' ? 'sxt'
: item.type == '应用资源'
? 'yyzy'
: item.componentType == '智能算法' : item.componentType == '智能算法'
? 'znsf' ? 'znsf'
: item.componentType == '图层服务' : item.componentType == '图层服务'
@ -1015,6 +1017,10 @@
background: url('~@/assets/home/sxt_square.png') no-repeat; background: url('~@/assets/home/sxt_square.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.yyzy {
background: url('~@/assets/home/yyzy_square.png') no-repeat;
background-size: 100%;
}
.znsf { .znsf {
background: url('~@/assets/home/znsf_square.png') no-repeat; background: url('~@/assets/home/znsf_square.png') no-repeat;
background-size: 100%; background-size: 100%;

View File

@ -9,38 +9,83 @@
<div class="form-container"> <div class="form-container">
<div v-if="applySuccess"> <div v-if="applySuccess">
<div class="title">申请人信息</div> <div class="title">申请人信息</div>
<a-form ref="formRef" :model="formName" name="basic" :label-col="{ style: { width: '106px' } }" <a-form
:wrapper-col="{ style: { width: '230px' } }" labelAlign="left" autocomplete="off"> ref="formRef"
:model="formName"
name="basic"
:label-col="{ style: { width: '106px' } }"
:wrapper-col="{ style: { width: '230px' } }"
labelAlign="left"
autocomplete="off"
>
<div class="base-info"> <div class="base-info">
<a-form-item label="申请人" name="applyUserName" :rules="[{ required: true, message: '请输入申请人' }]"> <a-form-item
<a-input placeholder="请输入申请人" v-model:value="formName.applyUserName" /> label="申请人"
name="applyUserName"
:rules="[{ required: true, message: '请输入申请人' }]"
>
<a-input
placeholder="请输入申请人"
v-model:value="formName.applyUserName"
/>
</a-form-item> </a-form-item>
<a-form-item style="margin: 0 22px" label="申请人电话" name="applyUserPhone" :rules="[ <a-form-item
{ style="margin: 0 22px"
required: true, label="申请人电话"
pattern: /^1[3456789]\d{9}$/, name="applyUserPhone"
message: '请输入正确的电话号码', :rules="[
}, {
]"> required: true,
<a-input placeholder="请输入申请人电话" v-model:value="formName.applyUserPhone" /> pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的电话号码',
},
]"
>
<a-input
placeholder="请输入申请人电话"
v-model:value="formName.applyUserPhone"
/>
</a-form-item> </a-form-item>
<a-form-item label="申请单位" name="applyUserDeptName" :rules="[{ required: true, message: '请输入申请单位' }]"> <a-form-item
<a-input placeholder="请输入申请单位" v-model:value="formName.applyUserDeptName" /> label="申请单位"
name="applyUserDeptName"
:rules="[{ required: true, message: '请输入申请单位' }]"
>
<a-input
placeholder="请输入申请单位"
v-model:value="formName.applyUserDeptName"
/>
</a-form-item> </a-form-item>
</div> </div>
<div class="title">需求信息</div> <div class="title">需求信息</div>
<a-form-item style="margin-bottom: 10px" label="需求标题" name="demandSubject" <a-form-item
:rules="[{ required: true, message: '请输入需求标题' }]"> style="margin-bottom: 10px"
<a-input style="width: 350px" v-model:value="formName.demandSubject" /> label="需求标题"
name="demandSubject"
:rules="[{ required: true, message: '请输入需求标题' }]"
>
<a-input
style="width: 350px"
v-model:value="formName.demandSubject"
/>
</a-form-item> </a-form-item>
<a-form-item style="margin-bottom: 10px" label="需求类型" name="detailsType" <a-form-item
:rules="[{ required: true, message: '请选择需求类型' }]"> style="margin-bottom: 10px"
<a-select ref="select" v-model:value="formName.detailsType" @focus="focus" style="width: 200px"> label="需求类型"
name="detailsType"
:rules="[{ required: true, message: '请选择需求类型' }]"
>
<a-select
ref="select"
v-model:value="formName.detailsType"
@focus="focus"
style="width: 200px"
>
<a-select-option value="基础设施">基础设施</a-select-option> <a-select-option value="基础设施">基础设施</a-select-option>
<a-select-option value="数据资源">数据资源</a-select-option> <a-select-option value="数据资源">数据资源</a-select-option>
<a-select-option value="组件服务">组件服务</a-select-option> <a-select-option value="组件服务">组件服务</a-select-option>
@ -49,14 +94,35 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="应用领域" name="detailsField" style="width: 350px" <a-form-item
label="应用领域"
name="detailsField"
style="width: 6.93rem"
:rules="[{ required: true, message: '请选择应用领域' }]"
>
<a-select
v-model:value="formName.detailsField"
:options="applicationSceneOpthion"
mode="tags"
:size="size"
placeholder="请选择应用领域"
:filterOption="false"
:searchValue="false"
style="width: 5.87rem"
></a-select>
</a-form-item>
<!-- <a-form-item label="应用领域" name="detailsField" style="width: 350px"
:rules="[{ required: true, message: '请输入应用领域' }]"> :rules="[{ required: true, message: '请输入应用领域' }]">
<a-input placeholder="请输入应用领域" v-model:value="formName.detailsField" /> <a-input placeholder="请输入应用领域" v-model:value="formName.detailsField" />
</a-form-item> </a-form-item> -->
<a-form-item
<a-form-item style="margin-bottom: 10px" label="需求描述" name="demandDetails" style="margin-bottom: 10px"
:rules="[{ required: true, message: '请输入需求描述' }]"> label="需求描述"
<a-textarea style=" name="demandDetails"
:rules="[{ required: true, message: '请输入需求描述' }]"
>
<a-textarea
style="
width: 500px; width: 500px;
height: 150px; height: 150px;
font-size: 16px; font-size: 16px;
@ -66,12 +132,24 @@
border-radius: 6px; border-radius: 6px;
padding: 10px; padding: 10px;
resize: none; resize: none;
" v-model:value="formName.demandDetails" /> "
v-model:value="formName.demandDetails"
/>
</a-form-item> </a-form-item>
<a-form-item style="color: #666; font-size: 16px" label="附件上传" name="applyDoc"> <a-form-item
<a-upload v-model:file-list="fileList" name="file" :action="upLoadUrl" :headers="headers" style="color: #666; font-size: 16px"
@change="handleChange"> label="附件上传"
<a-button style=" name="applyDoc"
>
<a-upload
v-model:file-list="fileList"
name="file"
:action="upLoadUrl"
:headers="headers"
@change="handleChange"
>
<a-button
style="
width: 100px; width: 100px;
height: 30px; height: 30px;
margin-right: 10px; margin-right: 10px;
@ -82,7 +160,8 @@
border: 1px solid #bbd3ef; border: 1px solid #bbd3ef;
padding: 0; padding: 0;
text-align: center; text-align: center;
"> "
>
<upload-outlined></upload-outlined> <upload-outlined></upload-outlined>
文件上传 文件上传
</a-button> </a-button>
@ -93,7 +172,8 @@
</a-form-item> </a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }"> <a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<a-button style=" <a-button
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
margin-right: 20px; margin-right: 20px;
@ -104,10 +184,15 @@
border: none; border: none;
padding: 0; padding: 0;
text-align: center; text-align: center;
" type="primary" html-type="cancle" @click="signOut"> "
type="primary"
html-type="cancle"
@click="signOut"
>
退出申请 退出申请
</a-button> </a-button>
<a-button style=" <a-button
style="
width: 80px; width: 80px;
height: 38px; height: 38px;
background: #0087ff; background: #0087ff;
@ -117,7 +202,11 @@
border: none; border: none;
padding: 0; padding: 0;
text-align: center; text-align: center;
" type="primary" html-type="submit" @click="processStartHandle()"> "
type="primary"
html-type="submit"
@click="processStartHandle()"
>
提交申请 提交申请
</a-button> </a-button>
</a-form-item> </a-form-item>
@ -129,7 +218,7 @@
</div> </div>
<p> <p>
您已成功申请{{ 您已成功申请{{
formName.demandSubject || '' formName.demandSubject || ''
}},请耐心等待审批结果结果会第一时间通知您 }},请耐心等待审批结果结果会第一时间通知您
</p> </p>
</div> </div>
@ -140,219 +229,236 @@
</template> </template>
<script> <script>
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
// import { UploadOutlined } from '@ant-design/icons-vue' // import { UploadOutlined } from '@ant-design/icons-vue'
import { getUser, getUserInfo, relaunch } from '@/api/home' import { getUser, getUserInfo, relaunch } from '@/api/home'
import { import {
demandApply, demandApply,
getDemandForm, getDemandForm,
updateDemandForm, updateDemandForm,
} from '@/api/personalCenter' getCategoryTreePage,
// import { baseURL } from '@/config' } from '@/api/personalCenter'
import { useRouter } from 'vue-router' // import { baseURL } from '@/config'
import { useRouter } from 'vue-router'
export default { export default {
name: '', name: '',
props: {}, props: {},
components: { components: {
HomeHeader, HomeHeader,
// UploadOutlined, // UploadOutlined,
}, },
setup() { setup() {
const disabled = ref(false) const disabled = ref(false)
const upLoadUrl = ref(window.SITE_CONFIG.apiURL + '/upload') const upLoadUrl = ref(window.SITE_CONFIG.apiURL + '/upload')
const formName = reactive({ const formName = reactive({
applyUserDeptId: '', applyUserDeptId: '',
applyUserDeptName: '', applyUserDeptName: '',
applyUserId: '', applyUserId: '',
applyUserName: '', applyUserName: '',
applyUserPhone: '', applyUserPhone: '',
demandDetails: '', demandDetails: '',
demandSubject: '', demandSubject: '',
detailsField: '', detailsField: [],
detailsType: '', detailsType: '',
enclosure: '', enclosure: '',
})
// console.log(formName.demandSubject)
const router = useRouter()
const id = ref(router.currentRoute.value.query.id)
const taskId = ref(router.currentRoute.value.query.taskId)
if (id.value) {
getDemandForm(id.value).then((res) => {
console.log('回填数据===============>', res)
formName.applyUserPhone = res.data.data.applyUserPhone
formName.demandSubject = res.data.data.demandSubject
formName.detailsType = res.data.data.detailsType
formName.detailsField = res.data.data.detailsField
formName.demandDetails = res.data.data.demandDetails
formName.enclosure = res.data.data.enclosure
}) })
} // console.log(formName.demandSubject)
getUser().then((res) => {
formName.applyUserName = res.data.data.realName
formName.applyUserId = res.data.data.id
getUserInfo(formName.applyUserId).then((res) => {
if (res.data.data.mobile) {
formName.applyUserPhone = res.data.data.mobile
}
formName.applyUserDeptName = res.data.data.deptName
formName.applyUserDeptId = res.data.data.deptId
})
})
const formRef = ref() const router = useRouter()
const applySuccess = ref(true) const id = ref(router.currentRoute.value.query.id)
const taskId = ref(router.currentRoute.value.query.taskId)
// 退
const signOut = () => {
window.close()
}
const handleChange = (info) => {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
message.success(`${info.file.name} 文件上传成功`)
formName.enclosure = info.file.response.data
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 文件上传失败`)
}
}
const fileList = ref([])
const processStartHandle = () => {
if (id.value) { if (id.value) {
updateDemandForm(formName).then((upres) => { getDemandForm(id.value).then((res) => {
if (upres.data.code == 0) { console.log('回填数据===============>', res)
relaunch({ data: formName, taskId: taskId.value }).then((res) => { formName.applyUserPhone = res.data.data.applyUserPhone
console.log('驳回================>', res) formName.demandSubject = res.data.data.demandSubject
if (res.data.code == 0) { formName.detailsType = res.data.data.detailsType
message.success('重新发起流程成功!') formName.detailsField = res.data.data.detailsField
window.setTimeout(() => { formName.demandDetails = res.data.data.demandDetails
window.close() formName.enclosure = res.data.data.enclosure
}, 1000)
} else {
message.error('重新发起流程失败!')
}
})
} else {
message.error('数据更新失败!')
}
}) })
} else { }
formRef.value.validate().then(() => { const applicationSceneOpthion = ref([])
demandApply(formName).then((res) => { getCategoryTreePage({
applySuccess.value = false page: 1,
message.success('操作成功!') limit: 20,
console.log('能力申请================>', res) 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)
} })
getUser().then((res) => {
formName.applyUserName = res.data.data.realName
formName.applyUserId = res.data.data.id
getUserInfo(formName.applyUserId).then((res) => {
if (res.data.data.mobile) {
formName.applyUserPhone = res.data.data.mobile
}
formName.applyUserDeptName = res.data.data.deptName
formName.applyUserDeptId = res.data.data.deptId
})
})
return { const formRef = ref()
formRef, const applySuccess = ref(true)
formName,
fileList, // 退
headers: { const signOut = () => {
authorization: 'authorization-text', window.close()
}, }
handleChange, const handleChange = (info) => {
applySuccess, if (info.file.status !== 'uploading') {
disabled, console.log(info.file, info.fileList)
signOut, }
processStartHandle,
upLoadUrl, if (info.file.status === 'done') {
// baseURL, message.success(`${info.file.name} 文件上传成功`)
} formName.enclosure = info.file.response.data
}, } else if (info.file.status === 'error') {
} message.error(`${info.file.name} 文件上传失败`)
}
}
const fileList = ref([])
const processStartHandle = () => {
if (id.value) {
updateDemandForm(formName).then((upres) => {
if (upres.data.code == 0) {
relaunch({ data: formName, taskId: taskId.value }).then((res) => {
console.log('驳回================>', res)
if (res.data.code == 0) {
message.success('重新发起流程成功!')
window.setTimeout(() => {
window.close()
}, 1000)
} else {
message.error('重新发起流程失败!')
}
})
} else {
message.error('数据更新失败!')
}
})
} else {
formRef.value.validate().then(() => {
demandApply(formName).then((res) => {
applySuccess.value = false
message.success('操作成功!')
console.log('能力申请================>', res)
})
})
}
}
return {
formRef,
formName,
fileList,
headers: {
authorization: 'authorization-text',
},
handleChange,
applySuccess,
disabled,
signOut,
processStartHandle,
upLoadUrl,
// baseURL,
applicationSceneOpthion,
}
},
}
</script> </script>
<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: 90px auto 0; margin: 90px auto 0;
display: flex;
justify-content: space-between;
aside {
width: 282px;
height: 96%;
overflow-y: auto;
background-color: #fff;
margin: 1% 0 3%;
}
article {
width: 1090px;
height: 99%;
overflow-y: auto;
background-color: #fff;
margin: 5% auto;
}
.form-container {
padding: 20px 20px 30px 20px;
.title {
font-size: 20px;
color: #000;
font-weight: bold;
margin-bottom: 20px;
}
}
.base-info {
display: flex; display: flex;
} justify-content: space-between;
:deep(.ant-form-item-label) { aside {
label { width: 282px;
color: #666; height: 96%;
font-size: 16px; overflow-y: auto;
background-color: #fff;
margin: 1% 0 3%;
}
&::after { article {
content: ''; width: 1090px;
height: 99%;
overflow-y: auto;
background-color: #fff;
margin: 5% auto;
}
.form-container {
padding: 20px 20px 30px 20px;
.title {
font-size: 20px;
color: #000;
font-weight: bold;
margin-bottom: 20px;
} }
} }
}
:deep(.ant-form-item-required) { .base-info {
&::before { display: flex;
font-size: 8px;
margin-right: 10px;
}
}
:deep(.ant-input) {
border: 1px solid #e0e0e0;
border-radius: 6px;
}
.success {
div {
width: 100px;
margin: 80px auto 40px;
} }
text-align: center; :deep(.ant-form-item-label) {
font-size: 20px; label {
font-weight: bold; color: #666;
color: #000; font-size: 16px;
&::after {
content: '';
}
}
}
:deep(.ant-form-item-required) {
&::before {
font-size: 8px;
margin-right: 10px;
}
}
:deep(.ant-input) {
border: 1px solid #e0e0e0;
border-radius: 6px;
}
.success {
div {
width: 100px;
margin: 80px auto 40px;
}
text-align: center;
font-size: 20px;
font-weight: bold;
color: #000;
}
} }
}
</style> </style>
<style> <style>
body, body,
html { html {
height: unset; height: unset;
} }
</style> </style>