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

This commit is contained in:
a0049873 2022-07-18 17:26:26 +08:00
commit a740904660
16 changed files with 639 additions and 363 deletions

View File

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

View File

@ -609,7 +609,7 @@
const visibleAssociatedApplication = ref(false)
const mockData = ref([])
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
const titleName = ref('关联应用')
const titleName = ref('来源应用')
const targetKeys = ref([])
//
const targetKeysBack = ref([])
@ -705,7 +705,9 @@
console.log('targetKeys: ', nextTargetKeys)
console.log('direction: ', direction)
console.log('moveKeys: ', moveKeys)
targetKeys.value = moveKeys.filter((item, index) => index === 0)
if (direction === 'right') {
targetKeys.value = moveKeys.filter((item, index) => index === 0)
}
}
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {

View File

@ -283,6 +283,11 @@
background-position: center;
background-size: 635px 340px;
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
vertical-align: middle;
}
.content-top {
font-size: 22px;
line-height: 22px;

View File

@ -250,6 +250,11 @@
background-position: center;
background-size: 635px 340px;
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
vertical-align: middle;
}
.content-top {
font-size: 22px;
line-height: 22px;

View File

@ -6,7 +6,7 @@
* @Description: 应用详情
-->
<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>
<div class="main">
<div class="main-left">
@ -18,14 +18,24 @@
<div class="main-center">
<p>{{ dataFrom.numberName }}</p>
<p>{{ dataFrom.number }}</p>
<div @click="copyFunction(dataFrom.number, '复制账号')">复制账号</div>
<div
@click="copyFunction(dataFrom.number, '复制账号')"
v-if="dataFrom.number != ''"
>
复制账号
</div>
<div v-else id="zanwu">暂无</div>
</div>
<div class="main-right">
<p>{{ dataFrom.passwordName }}</p>
<p>{{ dataFrom.password }}</p>
<div @click="copyFunction(dataFrom.password2, '复制密码')">
<div
@click="copyFunction(dataFrom.password2, '复制密码')"
v-if="dataFrom.password != ''"
>
复制密码
</div>
<div v-else id="zanwu">暂无</div>
</div>
</div>
</div>
@ -35,14 +45,16 @@
import { ref, defineProps, watch } from 'vue'
import { message } from 'ant-design-vue'
let flag = ref(true)
const whoShow1 = ref(whoShow)
console.log('whoShow1', whoShow1.value.itShowQingDao)
const props = defineProps({
dataList: { type: Object, default: null },
})
const dataFrom = ref({
linkName: '访问地址',
link: 'http://localhost:8080/#/detailsfdddffffffffffffffdfgdfgdfdgdfgdfg',
link: '',
numberName: '试用账号',
number: 'zhangfeihu',
number: '',
passwordName: '试用密码',
password: '**************************',
password2: '',
@ -52,15 +64,17 @@
if (obj !== '已申请') {
flag.value = false
} else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
}
}
const clickLink = (link) => {
@ -68,15 +82,19 @@
}
//
const copyFunction = (data, name) => {
let url = data
let oInput = document.createElement('input')
oInput.value = url
document.body.appendChild(oInput)
oInput.select() // ;
console.log(oInput.value)
document.execCommand('Copy') //
oInput.remove() //
message.success(name + '成功')
if (data !== '') {
let url = data
let oInput = document.createElement('input')
oInput.value = url
document.body.appendChild(oInput)
oInput.select() // ;
console.log(oInput.value)
document.execCommand('Copy') //
oInput.remove() //
message.success(name + '成功')
} else {
message.error('复制为空')
}
}
message.config({
top: '100px', //
@ -96,15 +114,17 @@
if (obj !== '已申请') {
flag.value = false
} else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
}
}
}
@ -170,6 +190,13 @@
line-height: 0.34rem;
}
}
#zanwu {
height: 0.34rem;
width: 1.1rem;
font-size: 0.24rem;
color: #ffffff;
border: 0;
}
}
</style>
<style>

View File

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

View File

@ -58,6 +58,7 @@
key: 'common-problem',
},
])
const whoShow1 = ref(whoShow)
const props = defineProps({
selectNow: { type: String, default: '' },
dataList: { type: Object, default: null },
@ -100,13 +101,11 @@
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
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.push('部署与安全')
list.value.push('归属部门与服务商')
@ -146,13 +145,11 @@
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
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.push('部署与安全')
list.value.push('归属部门与服务商')

View File

@ -250,6 +250,11 @@
background-position: center;
background-size: 635px 340px;
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
vertical-align: middle;
}
.content-top {
font-size: 22px;
line-height: 22px;

View File

@ -8,12 +8,28 @@
<template>
<div class="application-presentation" v-if="flag">
<detals-title title="组件展示" type="IMAGE&VIDEO"></detals-title>
<div
class="main"
:style="`${img}background-position:center;background-size:cover;`"
>
<!-- <a-image :src="img"></a-image> -->
<div class="play" @click="showModal"></div>
<div class="box">
<div class="left" @click="chagneShow()"></div>
<div
class="main"
:style="`${img}background-position:center;background-size:cover;`"
v-if="
showArr.length > 0 && showArr[showFlag].attrType == '组件视频介绍'
"
>
<div class="play" @click="showModal"></div>
</div>
<div
class="main2"
v-if="showArr.length > 0 && showArr[showFlag].attrType == '组件图片'"
>
<a-image
:width="700"
:height="340"
:src="showArr[showFlag].attrValue"
/>
</div>
<div class="right" @click="chagneShow()"></div>
</div>
<a-modal
v-model:visible="visible"
@ -60,6 +76,13 @@
'fullScreen',
], //,
})
const showFlag = ref(0)
const showArr = ref([])
const chagneShow = () => {
if (showArr.value.length > 1) {
showFlag.value = showFlag.value == 0 ? 1 : 0
}
}
const showModal = () => {
visible.value = true
}
@ -70,42 +93,63 @@
const img = ref({})
console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) {
showArr.value = props.dataList.infoList.filter(
(item) => item.attrType === '组件视频介绍' || item.attrType === '组件图片'
)
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '组件视频介绍'
)[0]
console.log('视频==============>', obj)
if (!obj) {
console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false
} else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '组件图片'
)[0]
options.src = obj.attrValue
if (imgindex) {
img.value = 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
if (obj) {
options.src = obj.attrValue
}
}
// if (!obj) {
// flag.value = false
// } else {
// let imgindex = props.dataList.infoList.filter(
// (item) => item.attrType === ''
// )[0]
// options.src = obj.attrValue
// if (imgindex) {
// img.value = 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
// }
// }
}
watch(
() => props.dataList,
(val) => {
if (val) {
showArr.value = props.dataList.infoList.filter(
(item) =>
item.attrType === '组件视频介绍' || item.attrType === '组件图片'
)
let obj = val.infoList.filter(
(item) => item.attrType === '组件视频介绍'
)[0]
console.log('视频==============>', obj)
if (!obj) {
console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false
} else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '组件图片'
)[0]
options.src = obj.attrValue
if (imgindex) {
img.value =
'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
if (obj) {
options.src = obj.attrValue
}
}
// if (!obj) {
// flag.value = false
// } else {
// let imgindex = props.dataList.infoList.filter(
// (item) => item.attrType === ''
// )[0]
// options.src = obj.attrValue
// if (imgindex) {
// img.value =
// 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
// }
// }
}
}
)
@ -114,6 +158,7 @@
.application-presentation {
padding: 0.8rem 3rem 0;
.main {
width: 13.14rem;
height: 3.4rem;
border-radius: 0.1rem;
background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat;
@ -130,5 +175,47 @@
cursor: pointer;
}
}
.main2 {
width: 13.14rem;
height: 3.4rem;
border-radius: 0.1rem;
background-size: 100%;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
}
}
.box {
display: flex;
justify-content: space-around;
align-items: center;
margin-bottom: 0.8rem;
.left {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-right: 0.2rem;
background: url('~@/assets/detailsAll/business/business_previous.png')
no-repeat;
background-size: 100%;
background-position: center;
}
.right {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-left: 0.2rem;
background: url('~@/assets/detailsAll/business/business_next.png')
no-repeat;
background-size: 100%;
background-position: center;
}
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
</style>

View File

@ -283,6 +283,11 @@
background-position: center;
background-size: 635px 340px;
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
vertical-align: middle;
}
.content-top {
font-size: 22px;
line-height: 22px;

View File

@ -250,6 +250,11 @@
background-position: center;
background-size: 635px 340px;
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
vertical-align: middle;
}
.content-top {
font-size: 22px;
line-height: 22px;

View File

@ -99,29 +99,28 @@
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '组件地址'
)[0]
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName || '--'
props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--'
} else if (item.attrType == '服务商' || item.attrType == '服务商名') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--'
}
})
dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName || '--'
props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue || '暂无数据'
} else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--'
} else if (item.attrType == '服务商' || item.attrType == '服务商名') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--'
}
})
if (dataFrom.value.link === '') {
dataFrom.value.link = '暂无数据'
}
}
console.log('obj', dataFrom.value)
@ -161,32 +160,28 @@
(val) => {
if (val) {
let obj = val.infoList.filter((item) => item.attrType === '组件地址')[0]
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName || '--'
props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--'
} else if (
item.attrType == '服务商' ||
item.attrType == '服务商名'
) {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--'
}
})
dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName || '--'
props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue || '暂无数据'
} else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--'
} else if (item.attrType == '服务商' || item.attrType == '服务商名') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--'
}
})
if (dataFrom.value.link === '') {
dataFrom.value.link = '暂无数据'
}
}
}
@ -249,7 +244,7 @@
// -webkit-line-clamp: 1;
& > span:last-child {
display: inline-block;
width: 1.19rem;
width: 1.49rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

View File

@ -157,9 +157,13 @@
}
const componentType = ref('')
if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
if (
props.dataList.infoList.filter((val) => val.attrType === '应用领域')[0]
) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
}
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
@ -178,9 +182,15 @@
() => props.dataList,
(val) => {
if (val) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
if (
props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0]
) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
}
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]

View File

@ -250,6 +250,11 @@
background-position: center;
background-size: 635px 340px;
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
vertical-align: middle;
}
.content-top {
font-size: 22px;
line-height: 22px;

View File

@ -515,6 +515,7 @@
console.log('or use this.value', searchValue.value)
}
function toView(type, item) {
debugger
if (props.selectCardsname == '数据资源') {
if (whoShow1.itShowQingDao) {
window.open(
@ -522,7 +523,9 @@
item.guid
)
} else {
window.open('http://10.134.135.24:30090/#/home')
window.open(
'http://10.134.135.24:30090/#/home?id=' + item.serviceId
)
}
} else if (props.selectCardsname === '融合服务') {
router.push({

View File

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