demandSubject
This commit is contained in:
parent
dc0a44dab7
commit
20b968beba
|
@ -84,7 +84,11 @@ export default {
|
|||
methods: {
|
||||
// 重置
|
||||
resetDataList () {
|
||||
this.dataForm = this.noDataForm
|
||||
this.dataForm = {
|
||||
orderId: '',
|
||||
status: '',
|
||||
userId: ''
|
||||
},
|
||||
this.page = 1 // 当前页码
|
||||
this.query()
|
||||
},
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
<!-- 使用方式 -->
|
||||
<div class="usage-mode" v-if="flag">
|
||||
<div class="tltle">
|
||||
<DetalsTitle
|
||||
:title="dataFrom.title"
|
||||
:type="dataFrom.englishTitle"
|
||||
></DetalsTitle>
|
||||
<DetalsTitle :title="dataFrom.title" :type="dataFrom.englishTitle"></DetalsTitle>
|
||||
</div>
|
||||
<div class="content" v-for="item in dataFrom.content" :key="item.title">
|
||||
<div class="content-left">
|
||||
|
@ -31,7 +28,7 @@
|
|||
<div class="content-right-title">{{ item.contact }}</div>
|
||||
<div class="content-right-content">
|
||||
<p>
|
||||
<span>{{ item.contact }}</span>
|
||||
<span>{{ item.facilitator.name }}</span>
|
||||
<a-tooltip>
|
||||
<template #title>{{ item.facilitator.value }}</template>
|
||||
<span>{{ item.facilitator.value }}</span>
|
||||
|
@ -57,7 +54,7 @@
|
|||
<div class="content-right-title">{{ item.contact2 }}</div>
|
||||
<div class="content-right-content">
|
||||
<p>
|
||||
<span>{{ item.contact2 }}</span>
|
||||
<span>{{ item.facilitator2.name }}</span>
|
||||
<a-tooltip>
|
||||
<template #title>{{ item.facilitator2.value }}</template>
|
||||
<span>{{ item.facilitator2.value }}</span>
|
||||
|
@ -85,275 +82,286 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { pinyin } from 'pinyin-pro'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
let dataFrom = ref({
|
||||
link: '',
|
||||
title: '使用方式',
|
||||
englishTitle: 'USAGE',
|
||||
content: [
|
||||
{
|
||||
title: '组件地址',
|
||||
link: {
|
||||
name: '接口地址:',
|
||||
},
|
||||
linkValue: '',
|
||||
contact: '归属部门',
|
||||
facilitator: { name: '归属部门:', value: '' },
|
||||
people: { name: '部门联系人:', value: '' },
|
||||
phone: {
|
||||
name: '联系人电话:',
|
||||
value: '',
|
||||
},
|
||||
contact2: '服务商',
|
||||
facilitator2: { name: '服务商:', value: '' },
|
||||
people2: { name: '服务商联系人:', value: '' },
|
||||
phone2: {
|
||||
name: '联系人电话:',
|
||||
value: '',
|
||||
},
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { pinyin } from 'pinyin-pro'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
let dataFrom = ref({
|
||||
link: '',
|
||||
title: '使用方式',
|
||||
englishTitle: 'USAGE',
|
||||
content: [
|
||||
{
|
||||
title: '组件地址',
|
||||
link: {
|
||||
name: '接口地址:',
|
||||
},
|
||||
],
|
||||
})
|
||||
//数据初始化
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
const flag = ref(true)
|
||||
if (props.dataList.infoList) {
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '技术文档' ||
|
||||
item.attrType === '服务商' ||
|
||||
item.attrType === '服务商联系人' ||
|
||||
item.attrType === '使用手册' ||
|
||||
item.attrType === '服务地址' ||
|
||||
item.attrType === '样式服务地址' ||
|
||||
item.attrType === '服务商联系电话'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
dataFrom.value.content[0].link.value = props.dataList.apiUrl
|
||||
dataFrom.value.content[0].facilitator.value = props.dataList.deptName
|
||||
dataFrom.value.content[0].people.value = props.dataList.deptContacts
|
||||
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
|
||||
console.log('dataList', props.dataList)
|
||||
props.dataList.infoList.map((item) => {
|
||||
if (item.attrType === '组件地址') {
|
||||
dataFrom.value.content[0].linkValue = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商') {
|
||||
dataFrom.value.content[0].facilitator2.value = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系人') {
|
||||
dataFrom.value.content[0].people2.value = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系电话') {
|
||||
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
|
||||
}
|
||||
})
|
||||
}
|
||||
linkValue: '',
|
||||
contact: '归属部门',
|
||||
facilitator: { name: '归属部门:', value: '' },
|
||||
people: { name: '部门联系人:', value: '' },
|
||||
phone: {
|
||||
name: '联系人电话:',
|
||||
value: '',
|
||||
},
|
||||
contact2: '服务商',
|
||||
facilitator2: { name: '服务商:', value: '' },
|
||||
people2: { name: '服务商联系人:', value: '' },
|
||||
phone2: {
|
||||
name: '联系人电话:',
|
||||
value: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
//数据初始化
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
const flag = ref(true)
|
||||
if (props.dataList.infoList) {
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '技术文档' ||
|
||||
item.attrType === '服务商' ||
|
||||
item.attrType === '服务商联系人' ||
|
||||
item.attrType === '使用手册' ||
|
||||
item.attrType === '服务地址' ||
|
||||
item.attrType === '样式服务地址' ||
|
||||
item.attrType === '服务商联系电话'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
dataFrom.value.content[0].link.value = props.dataList.apiUrl
|
||||
dataFrom.value.content[0].facilitator.value = props.dataList.deptName
|
||||
dataFrom.value.content[0].people.value = props.dataList.deptContacts
|
||||
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
|
||||
console.log('dataList', props.dataList)
|
||||
props.dataList.infoList.map((item) => {
|
||||
if (item.attrType === '组件地址') {
|
||||
dataFrom.value.content[0].linkValue = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商') {
|
||||
dataFrom.value.content[0].facilitator2.value = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系人') {
|
||||
dataFrom.value.content[0].people2.value = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系电话') {
|
||||
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
|
||||
}
|
||||
})
|
||||
}
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
let obj = val.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '技术文档' ||
|
||||
item.attrType === '服务商' ||
|
||||
item.attrType === '服务商联系人' ||
|
||||
item.attrType === '使用手册' ||
|
||||
item.attrType === '服务地址' ||
|
||||
item.attrType === '样式服务地址' ||
|
||||
item.attrType === '服务商联系电话'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
dataFrom.value.content[0].link.value = val.apiUrl
|
||||
dataFrom.value.content[0].facilitator.value = val.deptName
|
||||
dataFrom.value.content[0].people.value = val.deptContacts
|
||||
dataFrom.value.content[0].phone.value = val.deptPhone
|
||||
console.log('dataList', val)
|
||||
val.infoList.map((item) => {
|
||||
if (item.attrType === '组件地址') {
|
||||
dataFrom.value.content[0].linkValue = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商') {
|
||||
dataFrom.value.content[0].facilitator2.value =
|
||||
item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系人') {
|
||||
dataFrom.value.content[0].people2.value = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系电话') {
|
||||
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
let obj = val.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '技术文档' ||
|
||||
item.attrType === '服务商' ||
|
||||
item.attrType === '服务商联系人' ||
|
||||
item.attrType === '使用手册' ||
|
||||
item.attrType === '服务地址' ||
|
||||
item.attrType === '样式服务地址' ||
|
||||
item.attrType === '服务商联系电话'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
dataFrom.value.content[0].link.value = val.apiUrl
|
||||
dataFrom.value.content[0].facilitator.value = val.deptName
|
||||
dataFrom.value.content[0].people.value = val.deptContacts
|
||||
dataFrom.value.content[0].phone.value = val.deptPhone
|
||||
console.log('dataList', val)
|
||||
val.infoList.map((item) => {
|
||||
if (item.attrType === '组件地址') {
|
||||
dataFrom.value.content[0].linkValue = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商') {
|
||||
dataFrom.value.content[0].facilitator2.value =
|
||||
item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系人') {
|
||||
dataFrom.value.content[0].people2.value = item.attrValue || '--'
|
||||
} else if (item.attrType === '服务商联系电话') {
|
||||
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
function technical() {
|
||||
// 拼接路径
|
||||
// const type = pinyin(props.dataList.type, {
|
||||
// pattern: 'initial',
|
||||
// }).replace(/\s*/g, '')
|
||||
// // 打开文档
|
||||
// const id = props.dataList.id
|
||||
// window.open(window.SITE_CONFIG.frontUrl + type + '/' + id + '.md', '_blank')
|
||||
// console.log('dataFrom.value.link', dataFrom.value.link)
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '技术文档'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
function technical() {
|
||||
// 拼接路径
|
||||
// const type = pinyin(props.dataList.type, {
|
||||
// pattern: 'initial',
|
||||
// }).replace(/\s*/g, '')
|
||||
// // 打开文档
|
||||
// const id = props.dataList.id
|
||||
// window.open(window.SITE_CONFIG.frontUrl + type + '/' + id + '.md', '_blank')
|
||||
// console.log('dataFrom.value.link', dataFrom.value.link)
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '技术文档'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
}
|
||||
function technicalNew() {
|
||||
// 拼接路径
|
||||
// const type = pinyin(props.dataList.type, {
|
||||
// pattern: 'initial',
|
||||
// }).replace(/\s*/g, '')
|
||||
// // 打开文档
|
||||
// const id = props.dataList.id
|
||||
// window.open(window.SITE_CONFIG.frontUrl + type + '/' + id + '.md', '_blank')
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '使用手册'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
}
|
||||
}
|
||||
function technicalNew() {
|
||||
// 拼接路径
|
||||
// const type = pinyin(props.dataList.type, {
|
||||
// pattern: 'initial',
|
||||
// }).replace(/\s*/g, '')
|
||||
// // 打开文档
|
||||
// const id = props.dataList.id
|
||||
// window.open(window.SITE_CONFIG.frontUrl + type + '/' + id + '.md', '_blank')
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '使用手册'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.usage-mode {
|
||||
.usage-mode {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.8rem 0;
|
||||
|
||||
.content {
|
||||
margin-top: 0.3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.8rem 0;
|
||||
.content {
|
||||
margin-top: 0.3rem;
|
||||
|
||||
.content-left {
|
||||
height: 1.8rem;
|
||||
width: 6.2rem;
|
||||
background: linear-gradient(to right,
|
||||
rgba(113, 132, 252, 0.4),
|
||||
rgba(148, 163, 252, 0.4));
|
||||
border-radius: 0.1rem;
|
||||
margin-right: 0.6rem;
|
||||
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
|
||||
display: flex;
|
||||
.content-left {
|
||||
height: 1.8rem;
|
||||
width: 6.2rem;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
rgba(113, 132, 252, 0.4),
|
||||
rgba(148, 163, 252, 0.4)
|
||||
);
|
||||
border-radius: 0.1rem;
|
||||
margin-right: 0.6rem;
|
||||
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0.35rem;
|
||||
.left {
|
||||
.content-left-title {
|
||||
font-size: 0.26rem;
|
||||
line-height: 0.26rem;
|
||||
color: #212956;
|
||||
margin-bottom: 0.2rem;
|
||||
span:first-child {
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
}
|
||||
.content-left-content {
|
||||
width: 4.2rem;
|
||||
font-size: 0.2rem;
|
||||
color: rgba(33, 41, 86, 0.8);
|
||||
line-height: 0.2rem;
|
||||
p {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
// margin-bottom: 0.1rem;
|
||||
font-size: 20px;
|
||||
color: #212956;
|
||||
line-height: 26px;
|
||||
}
|
||||
p:last-of-type {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right {
|
||||
div {
|
||||
height: 0.4rem;
|
||||
width: 1.3rem;
|
||||
background: #ffffff;
|
||||
border-radius: 0.2rem;
|
||||
color: #526aff;
|
||||
font-size: 0.2rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
div:first-child {
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-right {
|
||||
height: 1.8rem;
|
||||
width: 6.2rem;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
rgba(113, 132, 252, 0.4),
|
||||
rgba(148, 163, 252, 0.4)
|
||||
);
|
||||
border-radius: 0.1rem;
|
||||
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 0 0.3rem;
|
||||
.content-right-left {
|
||||
border-right: 0.01rem solid #b0b9f1;
|
||||
padding-right: 0.1rem;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
.content-right-title {
|
||||
align-items: center;
|
||||
padding: 0 0.35rem;
|
||||
|
||||
.left {
|
||||
.content-left-title {
|
||||
font-size: 0.26rem;
|
||||
line-height: 0.26rem;
|
||||
color: #212956;
|
||||
margin-bottom: 0.15rem;
|
||||
margin-bottom: 0.2rem;
|
||||
|
||||
span:first-child {
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
}
|
||||
.content-right-content {
|
||||
display: flex;
|
||||
font-size: 0.16rem;
|
||||
|
||||
.content-left-content {
|
||||
width: 4.2rem;
|
||||
font-size: 0.2rem;
|
||||
color: rgba(33, 41, 86, 0.8);
|
||||
line-height: 0.2rem;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
flex-direction: column;
|
||||
|
||||
p {
|
||||
// width: 1.60rem;
|
||||
height: 0.2rem;
|
||||
display: -webkit-box;
|
||||
// overflow: hidden;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-right: 0.15rem;
|
||||
span {
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
color: #212956;
|
||||
opacity: 0.8;
|
||||
}
|
||||
// margin-bottom: 0.1rem;
|
||||
font-size: 20px;
|
||||
color: #212956;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
p:last-of-type {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
div {
|
||||
height: 0.4rem;
|
||||
width: 1.3rem;
|
||||
background: #ffffff;
|
||||
border-radius: 0.2rem;
|
||||
color: #526aff;
|
||||
font-size: 0.2rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div:first-child {
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-right {
|
||||
height: 1.8rem;
|
||||
width: 6.2rem;
|
||||
background: linear-gradient(to right,
|
||||
rgba(113, 132, 252, 0.4),
|
||||
rgba(148, 163, 252, 0.4));
|
||||
border-radius: 0.1rem;
|
||||
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 0 0.3rem;
|
||||
|
||||
.content-right-left {
|
||||
// border-right: 0.01rem solid #b0b9f1;
|
||||
padding-right: 0.1rem;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
|
||||
.content-right-title {
|
||||
font-size: 0.26rem;
|
||||
line-height: 0.26rem;
|
||||
color: #212956;
|
||||
margin-bottom: 0.15rem;
|
||||
}
|
||||
|
||||
.content-right-content {
|
||||
display: flex;
|
||||
font-size: 0.16rem;
|
||||
color: rgba(33, 41, 86, 0.8);
|
||||
line-height: 0.2rem;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
flex-direction: column;
|
||||
|
||||
p {
|
||||
// width: 1.60rem;
|
||||
height: 0.2rem;
|
||||
display: -webkit-box;
|
||||
// overflow: hidden;
|
||||
white-space: nowrap;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-right: 0.15rem;
|
||||
|
||||
span {
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
color: #212956;
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -9,83 +9,38 @@
|
|||
<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>
|
||||
|
@ -94,26 +49,14 @@
|
|||
</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 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 style="margin-bottom: 10px" label="需求描述" name="demandDetails"
|
||||
:rules="[{ required: true, message: '请输入需求描述' }]">
|
||||
<a-textarea style="
|
||||
width: 500px;
|
||||
height: 150px;
|
||||
font-size: 16px;
|
||||
|
@ -123,24 +66,12 @@
|
|||
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;
|
||||
|
@ -151,8 +82,7 @@
|
|||
border: 1px solid #bbd3ef;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
"
|
||||
>
|
||||
">
|
||||
<upload-outlined></upload-outlined>
|
||||
文件上传
|
||||
</a-button>
|
||||
|
@ -163,8 +93,7 @@
|
|||
</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;
|
||||
|
@ -175,15 +104,10 @@
|
|||
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;
|
||||
|
@ -193,11 +117,7 @@
|
|||
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>
|
||||
|
@ -209,7 +129,7 @@
|
|||
</div>
|
||||
<p>
|
||||
您已成功申请{{
|
||||
formName.demandSubject || ''
|
||||
formName.demandSubject || ''
|
||||
}},请耐心等待审批结果,结果会第一时间通知您!
|
||||
</p>
|
||||
</div>
|
||||
|
@ -220,209 +140,219 @@
|
|||
</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,
|
||||
} 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: '',
|
||||
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
|
||||
})
|
||||
// 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 router = useRouter()
|
||||
const id = ref(router.currentRoute.value.query.id)
|
||||
const taskId = ref(router.currentRoute.value.query.taskId)
|
||||
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) {
|
||||
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
|
||||
})
|
||||
}
|
||||
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 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} file uploaded successfully`)
|
||||
formName.enclosure = info.file.response.data
|
||||
} else if (info.file.status === 'error') {
|
||||
message.error(`${info.file.name} file upload failed.`)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
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,
|
||||
}
|
||||
},
|
||||
}
|
||||
return {
|
||||
formRef,
|
||||
formName,
|
||||
fileList,
|
||||
headers: {
|
||||
authorization: 'authorization-text',
|
||||
},
|
||||
handleChange,
|
||||
applySuccess,
|
||||
disabled,
|
||||
signOut,
|
||||
processStartHandle,
|
||||
upLoadUrl,
|
||||
// baseURL,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
#apply-container {
|
||||
background-color: #f5f8fc;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 90px auto 0;
|
||||
#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 {
|
||||
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;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item-label) {
|
||||
label {
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
.base-info {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item-required) {
|
||||
&::before {
|
||||
font-size: 8px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
: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;
|
||||
}
|
||||
|
||||
: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;
|
||||
}
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
body,
|
||||
html {
|
||||
height: unset;
|
||||
}
|
||||
body,
|
||||
html {
|
||||
height: unset;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue