西海岸-视频资源申请-列表中包含西海岸开发分局添加申请附件个模板下载

This commit is contained in:
guoyue 2022-10-14 15:40:14 +08:00
parent 9c8785b8ce
commit 4354abdf25
2 changed files with 780 additions and 865 deletions

Binary file not shown.

View File

@ -8,93 +8,36 @@
</div> </div>
<div class="form-container"> <div class="form-container">
<div v-if="applySuccess"> <div v-if="applySuccess">
<a-form <a-form ref="formRef" :model="formName" name="basic" :label-col="{ style: { width: '106px' } }"
ref="formRef" :wrapper-col="{ style: { width: '230px' } }" labelAlign="left" autocomplete="off">
:model="formName"
name="basic"
:label-col="{ style: { width: '106px' } }"
:wrapper-col="{ style: { width: '230px' } }"
labelAlign="left"
autocomplete="off"
>
<div class="base-info flex-row-start"> <div class="base-info flex-row-start">
<a-form-item <a-form-item label="申请标题" name="title" :rules="[{ required: true, message: '请输入申请标题' }]">
label="申请标题" <a-input placeholder="请输入能力申请标题" v-model:value="formName.title" />
name="title"
:rules="[{ required: true, message: '请输入申请标题' }]"
>
<a-input
placeholder="请输入能力申请标题"
v-model:value="formName.title"
/>
</a-form-item> </a-form-item>
<!-- 西海岸-摄像头-增加过期时间 --> <!-- 西海岸-摄像头-增加过期时间 -->
<a-form-item <a-form-item v-if="isCamera && isXiHaiAn" label="过期时间" name="expireDate"
v-if="isCamera && isXiHaiAn" :rules="[{ required: true, message: '请选择过期时间' }]" style="margin-left: 22px">
label="过期时间" <a-select v-model:value="formName.expireDate" placeholder="请选择过期时间" style="width: 200px"
name="expireDate" :options="expireDateOptions"></a-select>
:rules="[{ required: true, message: '请选择过期时间' }]"
style="margin-left: 22px"
>
<a-select
v-model:value="formName.expireDate"
placeholder="请选择过期时间"
style="width: 200px"
:options="expireDateOptions"
></a-select>
</a-form-item> </a-form-item>
</div> </div>
<div class="base-info"> <div class="base-info">
<a-form-item <a-form-item label="申请人信息" name="user" :rules="[{ required: true, message: '请输入申请人' }]">
label="申请人信息" <a-input placeholder="请输入申请人" v-model:value="formName.user" disabled />
name="user"
:rules="[{ required: true, message: '请输入申请人' }]"
>
<a-input
placeholder="请输入申请人"
v-model:value="formName.user"
disabled
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item style="margin: 0 22px" label="电话" name="phone" :rules="[
style="margin: 0 22px"
label="电话"
name="phone"
:rules="[
{ {
required: true, required: true,
pattern: /^1[3456789]\d{9}$/, pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的电话号码', message: '请输入正确的电话号码',
}, },
]" ]">
> <a-input placeholder="请输入申请人电话" v-model:value="formName.phone" />
<a-input
placeholder="请输入申请人电话"
v-model:value="formName.phone"
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="单位" name="unit" :rules="[{ required: true, message: '请输入单位' }]">
label="单位" <a-input placeholder="请输入单位" v-model:value="formName.unit" disabled v-if="deptFlage" />
name="unit" <a-select v-else placeholder="请选择归属部门" v-model:value="formName.unit" @change="deptIdChangeFunction">
:rules="[{ required: true, message: '请输入单位' }]" <a-select-option v-for="(item, index) in deptNameAll" :key="`${index}-${item}`" :value="item.name">
>
<a-input
placeholder="请输入单位"
v-model:value="formName.unit"
disabled
v-if="deptFlage"
/>
<a-select
v-else
placeholder="请选择归属部门"
v-model:value="formName.unit"
@change="deptIdChangeFunction"
>
<a-select-option
v-for="(item, index) in deptNameAll"
:key="`${index}-${item}`"
:value="item.name"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -102,102 +45,61 @@
</div> </div>
<div class="base-info" v-if="flag"> <div class="base-info" v-if="flag">
<div style="margin-bottom: 24px"> <div style="margin-bottom: 24px">
<a-form-item <a-form-item style="margin-bottom: 0" label="应用系统" name="applicationSystem"
style="margin-bottom: 0" :rules="[{ required: true, message: '请选择应用系统' }]">
label="应用系统" <a-select v-model:value="formName.applicationSystem" show-search placeholder="请选择应用系统"
name="applicationSystem" style="width: 230px" :options="systemOptions" @focus="handleFocus" @blur="handleBlur"
:rules="[{ required: true, message: '请选择应用系统' }]" @change="systemHandleChange" @search="systemHandleSearch"></a-select>
>
<a-select
v-model:value="formName.applicationSystem"
show-search
placeholder="请选择应用系统"
style="width: 230px"
:options="systemOptions"
@focus="handleFocus"
@blur="handleBlur"
@change="systemHandleChange"
@search="systemHandleSearch"
></a-select>
</a-form-item> </a-form-item>
<span <span style="font-size: 12px; color: #666; padding-left: 106px">
style="font-size: 12px; color: #666; padding-left: 106px"
>
如选项没有系统请新增 如选项没有系统请新增
</span> </span>
</div> </div>
<a-form-item <a-form-item class="applicationScene" label="应用领域" name="applicationScene"
class="applicationScene" :rules="[{ required: true, message: '请选择应用领域' }]" style="width: 6.93rem">
label="应用领域" <a-select v-model:value="formName.applicationScene" :options="applicationSceneOpthion" mode="tags"
name="applicationScene" :size="size" placeholder="请选择应用领域" :filterOption="false" :searchValue="false"
:rules="[{ required: true, message: '请选择应用领域' }]" style="width: 5.87rem"></a-select>
style="width: 6.93rem" </a-form-item>
> </div>
<a-select <div>
v-model:value="formName.applicationScene" <a-form-item label="需求依据" name="applicationBackground" :rules="[
:options="applicationSceneOpthion" { required: true, message: '请输入需求依据' },
mode="tags" { min: 50, message: '需求依据最少为50个字' },
:size="size" ]">
placeholder="请选择应用领域" <a-textarea placeholder="请输入需求依据" v-model:value="formName.applicationBackground" :rows="4" />
:filterOption="false"
:searchValue="false"
style="width: 5.87rem"
></a-select>
</a-form-item> </a-form-item>
</div> </div>
<div> <!-- 西海岸--附件上传 -->
<a-form-item <div v-if="iskfq && isXiHaiAn">
label="需求依据" <a-row style="margin-top: 0.4rem">
name="applicationBackground" <a-col :span="24">
:rules="[ <a-form-item name="attachment" label="附件上传" class="introduction">
{ required: true, message: '请输入需求依据' }, <a-upload :max-count="1" accept=".doc,.docx,pdf" v-model:file-list="fileList"
{ min: 50, message: '需求依据最少为50个字' }, :action="`${apiURL}/upload`" @remove="handleRemove" @change="roomUpload">
]" <a-button>
> <upload-outlined>选择上传附件</upload-outlined>
<a-textarea </a-button>
placeholder="请输入需求依据" <span>
v-model:value="formName.applicationBackground" 支持docdocxPDF等格式支撑材料上传文件大小不超过100M
:rows="4" </span>
/> </a-upload>
</a-form-item> </a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="margin-left: 106px">
<a href="/static/download/感知资源申请表.doc" download="感知资源申请表">感知资源申请表模板下载</a>
</a-col>
</a-row>
</div> </div>
<div class="bottom-btn"> <div class="bottom-btn">
<a-button <a-button class="cancel-apply" type="primary" html-type="cancle" @click="resetFields()">
style="
width: 80px;
height: 38px;
margin-right: 20px;
background: #e1edfa;
color: #0087ff;
font-size: 14px;
border-radius: 6px;
border: none;
padding: 0;
text-align: center;
"
type="primary"
html-type="cancle"
@click="resetFields()"
>
退出申请 退出申请
</a-button> </a-button>
<a-button <a-button class="confirm-apply" type="primary" html-type="submit" @click="processStartHandle()">
style="
width: 80px;
height: 38px;
background: #0087ff;
color: #fff;
font-size: 14px;
border-radius: 6px;
border: none;
padding: 0;
text-align: center;
"
type="primary"
html-type="submit"
@click="processStartHandle()"
>
提交申请 提交申请
</a-button> </a-button>
</div> </div>
@ -215,14 +117,14 @@
</div> </div>
</template> </template>
<script> <script>
import AbilityToApplyFor from './AbilityToApplyFor.vue' import AbilityToApplyFor from './AbilityToApplyFor.vue'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { reactive, ref, watch, onBeforeUnmount } from 'vue' import { reactive, ref, watch, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import qs from 'qs' import qs from 'qs'
import { Upload } from 'ant-design-vue' import { Upload } from 'ant-design-vue'
import { import {
lastestPage, lastestPage,
tabilityapplication, tabilityapplication,
startOfBusinessKey, startOfBusinessKey,
@ -233,17 +135,17 @@
getUserInfo, getUserInfo,
relaunch, relaunch,
selectOne, selectOne,
} from '@/api/home' } from '@/api/home'
import { getDeptAll } from '@/api/user' import { getDeptAll } from '@/api/user'
import { getCategoryTreePage, endProcess } from '@/api/personalCenter' import { getCategoryTreePage, endProcess } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { sgcDel, getApplyForm } from '@/api/personalCenter' import { sgcDel, getApplyForm } from '@/api/personalCenter'
import { pageWithAttrs, updateIntegrationServices } from '@/api/home' import { pageWithAttrs, updateIntegrationServices } from '@/api/home'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
import { getIntegrationDetail, soldierApply } from '@/api/home' import { getIntegrationDetail, soldierApply } from '@/api/home'
import * as moment from 'moment' import * as moment from 'moment'
export default { export default {
name: '', name: '',
props: {}, props: {},
components: { components: {
@ -279,6 +181,7 @@
label: '90天', label: '90天',
}, },
] ]
const apiURL = window.SITE_CONFIG.apiURL
if (!applyAll) { if (!applyAll) {
list.value.map((item) => { list.value.map((item) => {
@ -307,6 +210,9 @@
const isXiHaiAn = ref(whoShow.itShowXiHaiAn) const isXiHaiAn = ref(whoShow.itShowXiHaiAn)
// 西-- // 西--
const isCamera = ref(false) const isCamera = ref(false)
// 西-
let note1 = JSON.parse(list.value[0] && list.value[0].arr && list.value[0].arr[0].note1 || "[]");
let iskfq = ref(note1.some(v=>v.managementUnitName == '开发区公安局' || v.managementUnitName == '开发区公安分局'))
if ( if (
list.value[0] && list.value[0] &&
list.value[0].arr && list.value[0].arr &&
@ -560,6 +466,7 @@
handleWrjApply(formName) handleWrjApply(formName)
return return
} }
submitApply(formName).then((res) => { submitApply(formName).then((res) => {
message.success('申请提交成功,请到消息中心查看!') message.success('申请提交成功,请到消息中心查看!')
console.log('能力申请================>', res) console.log('能力申请================>', res)
@ -693,10 +600,10 @@
processDefinitionKey: processDefinitionKey, processDefinitionKey: processDefinitionKey,
businessKey: businessKey, businessKey: businessKey,
}) })
updateInstanceId(params).then(() => {}) updateInstanceId(params).then(() => { })
} }
}) })
.catch(() => {}) .catch(() => { })
} }
const options = ref([ const options = ref([
{ {
@ -726,34 +633,6 @@
]) ])
const systemOptions = ref([]) const systemOptions = ref([])
const systemOptions2 = ref([]) const systemOptions2 = ref([])
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
formName.enclosureName = info.file.name
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`)
}
}
const beforeUpload = (file) => {
const isPNG =
file.type === 'image/png' ||
'image/doc' ||
'image/docx' ||
'image/jpg' ||
'image/png' ||
'image/jpeg' ||
'image/pdf' ||
'image/xlxs' ||
'image/ppt'
if (!isPNG) {
message.error(`上传失败`)
}
return isPNG || Upload.LIST_IGNORE
}
const fileList = ref([]) const fileList = ref([])
// //
const systemHandleChange = (value) => { const systemHandleChange = (value) => {
@ -880,6 +759,14 @@
}) })
} }
//
const roomUpload = (response) => {
if (response.file.response !== undefined) {
fileList.value = response.fileList
formName.attachment = response.file.response.data
}
}
return { return {
deptIdChangeFunction, deptIdChangeFunction,
formRef, formRef,
@ -897,11 +784,11 @@
headers: { headers: {
authorization: 'authorization-text', authorization: 'authorization-text',
}, },
handleChange, // handleChange,
applySuccess, applySuccess,
disabled, disabled,
baseURL, baseURL,
beforeUpload, // beforeUpload,
dataList, dataList,
systemHandleChange, systemHandleChange,
systemHandleSearch, systemHandleSearch,
@ -915,12 +802,15 @@
isCamera, isCamera,
isXiHaiAn, isXiHaiAn,
expireDateOptions, expireDateOptions,
apiURL,
roomUpload,
iskfq,
} }
}, },
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
#apply-container { #apply-container {
// background-color: #f5f8fc; // background-color: #f5f8fc;
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -999,9 +889,9 @@
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
} }
.applicationScene { .applicationScene {
:deep(.ant-select-selector) { :deep(.ant-select-selector) {
overflow-x: scroll; overflow-x: scroll;
} }
@ -1009,16 +899,41 @@
:deep(.ant-select-selection-overflow) { :deep(.ant-select-selection-overflow) {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
} }
textarea { textarea {
resize: none; resize: none;
font-size: 14px; font-size: 14px;
} }
.bottom-btn { .bottom-btn {
display: flex; display: flex;
justify-content: center; justify-content: center;
// position: fixed; // position: fixed;
} }
.cancel-apply {
width: 80px;
height: 38px;
margin-right: 20px;
background: #e1edfa;
color: #0087ff;
font-size: 14px;
border-radius: 6px;
border: none;
padding: 0;
text-align: center;
}
.confirm-apply {
width: 80px;
height: 38px;
background: #0087ff;
color: #fff;
font-size: 14px;
border-radius: 6px;
border: none;
padding: 0;
text-align: center;
}
</style> </style>