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) {
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

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-16 16:01:48
* @LastEditTime: 2022-07-18 14:09:10
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -49,7 +49,7 @@
window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
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['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['backUrl'] = 'http://124.222.94.39:9797';

View File

@ -1,13 +1,13 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-18 11:34:38
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-18 15:07:32
* @Description: 数据资源参数配置
*/
//const newLocation = 'qingdao'
const newLocation = 'qingdao'
// const newLocation = 'baotou'
const newLocation = 'xihaian'
// const newLocation = 'xihaian'
//
const whoShow = {}

View File

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

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">
@ -35,14 +35,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 +54,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 +72,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 +104,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 = ''
}
}
}
}

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

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

View File

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

View File

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

View File

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

View File

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

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>