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

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 class="form-container">
<div v-if="applySuccess">
<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 flex-row-start">
<a-form-item
label="申请标题"
name="title"
:rules="[{ required: true, message: '请输入申请标题' }]"
>
<a-input
placeholder="请输入能力申请标题"
v-model:value="formName.title"
/>
<a-form-item label="申请标题" name="title" :rules="[{ required: true, message: '请输入申请标题' }]">
<a-input placeholder="请输入能力申请标题" v-model:value="formName.title" />
</a-form-item>
<!-- 西海岸-摄像头-增加过期时间 -->
<a-form-item
v-if="isCamera && isXiHaiAn"
label="过期时间"
name="expireDate"
: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 v-if="isCamera && isXiHaiAn" label="过期时间" name="expireDate"
: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>
</div>
<div class="base-info">
<a-form-item
label="申请人信息"
name="user"
:rules="[{ required: true, message: '请输入申请人' }]"
>
<a-input
placeholder="请输入申请人"
v-model:value="formName.user"
disabled
/>
<a-form-item label="申请人信息" name="user" :rules="[{ required: true, message: '请输入申请人' }]">
<a-input placeholder="请输入申请人" v-model:value="formName.user" disabled />
</a-form-item>
<a-form-item
style="margin: 0 22px"
label="电话"
name="phone"
:rules="[
<a-form-item style="margin: 0 22px" label="电话" name="phone" :rules="[
{
required: true,
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的电话号码',
},
]"
>
<a-input
placeholder="请输入申请人电话"
v-model:value="formName.phone"
/>
]">
<a-input placeholder="请输入申请人电话" v-model:value="formName.phone" />
</a-form-item>
<a-form-item
label="单位"
name="unit"
:rules="[{ required: true, message: '请输入单位' }]"
>
<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"
>
<a-form-item label="单位" name="unit" :rules="[{ required: true, message: '请输入单位' }]">
<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 }}
</a-select-option>
</a-select>
@ -102,102 +45,61 @@
</div>
<div class="base-info" v-if="flag">
<div style="margin-bottom: 24px">
<a-form-item
style="margin-bottom: 0"
label="应用系统"
name="applicationSystem"
:rules="[{ required: true, message: '请选择应用系统' }]"
>
<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 style="margin-bottom: 0" label="应用系统" name="applicationSystem"
:rules="[{ required: true, message: '请选择应用系统' }]">
<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>
<span
style="font-size: 12px; color: #666; padding-left: 106px"
>
<span style="font-size: 12px; color: #666; padding-left: 106px">
如选项没有系统请新增
</span>
</div>
<a-form-item
class="applicationScene"
label="应用领域"
name="applicationScene"
:rules="[{ required: true, message: '请选择应用领域' }]"
style="width: 6.93rem"
>
<a-select
v-model:value="formName.applicationScene"
:options="applicationSceneOpthion"
mode="tags"
:size="size"
placeholder="请选择应用领域"
:filterOption="false"
:searchValue="false"
style="width: 5.87rem"
></a-select>
<a-form-item class="applicationScene" label="应用领域" name="applicationScene"
:rules="[{ required: true, message: '请选择应用领域' }]" style="width: 6.93rem">
<a-select v-model:value="formName.applicationScene" :options="applicationSceneOpthion" mode="tags"
:size="size" placeholder="请选择应用领域" :filterOption="false" :searchValue="false"
style="width: 5.87rem"></a-select>
</a-form-item>
</div>
<div>
<a-form-item label="需求依据" name="applicationBackground" :rules="[
{ required: true, message: '请输入需求依据' },
{ min: 50, message: '需求依据最少为50个字' },
]">
<a-textarea placeholder="请输入需求依据" v-model:value="formName.applicationBackground" :rows="4" />
</a-form-item>
</div>
<div>
<a-form-item
label="需求依据"
name="applicationBackground"
:rules="[
{ required: true, message: '请输入需求依据' },
{ min: 50, message: '需求依据最少为50个字' },
]"
>
<a-textarea
placeholder="请输入需求依据"
v-model:value="formName.applicationBackground"
:rows="4"
/>
<!-- 西海岸--附件上传 -->
<div v-if="iskfq && isXiHaiAn">
<a-row style="margin-top: 0.4rem">
<a-col :span="24">
<a-form-item name="attachment" label="附件上传" class="introduction">
<a-upload :max-count="1" accept=".doc,.docx,pdf" v-model:file-list="fileList"
:action="`${apiURL}/upload`" @remove="handleRemove" @change="roomUpload">
<a-button>
<upload-outlined>选择上传附件</upload-outlined>
</a-button>
<span>
支持docdocxPDF等格式支撑材料上传文件大小不超过100M
</span>
</a-upload>
</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 class="bottom-btn">
<a-button
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 class="cancel-apply" type="primary" html-type="cancle" @click="resetFields()">
退出申请
</a-button>
<a-button
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 class="confirm-apply" type="primary" html-type="submit" @click="processStartHandle()">
提交申请
</a-button>
</div>
@ -279,6 +181,7 @@
label: '90天',
},
]
const apiURL = window.SITE_CONFIG.apiURL
if (!applyAll) {
list.value.map((item) => {
@ -307,6 +210,9 @@
const isXiHaiAn = ref(whoShow.itShowXiHaiAn)
// 西--
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 (
list.value[0] &&
list.value[0].arr &&
@ -560,6 +466,7 @@
handleWrjApply(formName)
return
}
submitApply(formName).then((res) => {
message.success('申请提交成功,请到消息中心查看!')
console.log('能力申请================>', res)
@ -726,34 +633,6 @@
])
const systemOptions = 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 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 {
deptIdChangeFunction,
formRef,
@ -897,11 +784,11 @@
headers: {
authorization: 'authorization-text',
},
handleChange,
// handleChange,
applySuccess,
disabled,
baseURL,
beforeUpload,
// beforeUpload,
dataList,
systemHandleChange,
systemHandleSearch,
@ -915,6 +802,9 @@
isCamera,
isXiHaiAn,
expireDateOptions,
apiURL,
roomUpload,
iskfq,
}
},
}
@ -1021,4 +911,29 @@
justify-content: center;
// 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>