|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: tengmingxue 1473375109@qq.com
|
|
|
* @Date: 2023-08-15 22:08:21
|
|
|
* @LastEditors: tengmingxue 1473375109@qq.com
|
|
|
- * @LastEditTime: 2023-09-23 19:05:00
|
|
|
+ * @LastEditTime: 2023-09-24 11:46:09
|
|
|
* @FilePath: \xld-gis-admin\src\views\resource\map\SourceDetail.vue
|
|
|
* @Description: 地图资源明细界面
|
|
|
-->
|
|
|
@@ -14,7 +14,7 @@
|
|
|
<a-row class="form-container">
|
|
|
<a-col :span="12" class="form-col">
|
|
|
<a-form-item ref="code" label="资源编码" name="code" class="label-form-item">
|
|
|
- <a-input v-model:value="formState.code" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.code" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12" class="form-col">
|
|
|
@@ -24,7 +24,7 @@
|
|
|
name="servicename"
|
|
|
class="label-form-item"
|
|
|
>
|
|
|
- <a-input v-model:value="formState.servicename" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.servicename" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
@@ -35,7 +35,7 @@
|
|
|
name="servicealiasname"
|
|
|
class="label-form-item"
|
|
|
>
|
|
|
- <a-input v-model:value="formState.servicealiasname" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.servicealiasname" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
@@ -63,7 +63,13 @@
|
|
|
|
|
|
<a-col :span="24" class="form-col">
|
|
|
<a-form-item ref="thumbnail" label="缩略图" name="thumbnail" class="label-form-item">
|
|
|
- <a-upload action="" v-model:file-list="fileList" @change="uploadFilesChange" :multiple="false" :disabled="isView">
|
|
|
+ <a-upload
|
|
|
+ action=""
|
|
|
+ v-model:file-list="fileList"
|
|
|
+ @change="uploadFilesChange"
|
|
|
+ :multiple="false"
|
|
|
+ :disabled="isView"
|
|
|
+ >
|
|
|
<a-button style="background-color: #0671dd; color: #fff; border-radius: 4px">
|
|
|
<upload-outlined></upload-outlined>
|
|
|
文件上传
|
|
|
@@ -103,17 +109,17 @@
|
|
|
</a-col>
|
|
|
<a-col :span="24" class="form-col">
|
|
|
<a-form-item ref="mapingurl" label="服务地址" name="mapingurl" class="label-form-item">
|
|
|
- <a-input v-model:value="formState.mapingurl" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.mapingurl" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12" class="form-col">
|
|
|
<a-form-item ref="dataScope" label="数据范围" name="dataScope" class="label-form-item">
|
|
|
- <a-input v-model:value="formState.dataScope" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.dataScope" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12" class="form-col">
|
|
|
<a-form-item ref="source" label="数据来源" name="source" class="label-form-item">
|
|
|
- <a-input v-model:value="formState.source" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.source" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
@@ -133,7 +139,7 @@
|
|
|
name="sourcetable"
|
|
|
class="label-form-item"
|
|
|
>
|
|
|
- <a-input v-model:value="formState.formdatabase" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.formdatabase" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
@@ -172,7 +178,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12" class="form-col">
|
|
|
<a-form-item ref="source" label="发布者" name="source" class="label-form-item">
|
|
|
- <a-input v-model:value="formState.publisher" disabled :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.publisher" disabled :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
@@ -183,7 +189,7 @@
|
|
|
name="updatetype"
|
|
|
class="label-form-item"
|
|
|
>
|
|
|
- <a-input v-model:value="formState.updateType" :disabled="isView"/>
|
|
|
+ <a-input v-model:value="formState.updateType" :disabled="isView" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12" class="form-col">
|
|
|
@@ -214,6 +220,16 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
+ <a-col :span="12" class="form-col">
|
|
|
+ <a-form-item ref="shsqlc" label="适合申请流程" name="shsqlc" class="label-form-item">
|
|
|
+ <a-select v-model:value="formState.shsqlc" :disabled="isView">
|
|
|
+ <template v-for="appl in ApplProcesses" :key="appl.value">
|
|
|
+ <a-select-option :value="appl.value">{{ appl.label }}</a-select-option>
|
|
|
+ </template>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
<a-col :span="12" class="form-col">
|
|
|
<a-form-item
|
|
|
ref="runtimestatus"
|
|
|
@@ -230,7 +246,7 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
- <a-col :span="6" class="form-col">
|
|
|
+ <a-col :span="4" class="form-col">
|
|
|
<a-form-item ref="public" label="是否公开" name="public" class="label-form-item">
|
|
|
<a-switch
|
|
|
checked-children=""
|
|
|
@@ -240,7 +256,7 @@
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="6" class="form-col">
|
|
|
+ <a-col :span="4" class="form-col">
|
|
|
<a-form-item ref="share" label="是否共享" name="share" class="label-form-item">
|
|
|
<a-switch
|
|
|
checked-children=""
|
|
|
@@ -250,7 +266,7 @@
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="6" class="form-col">
|
|
|
+ <a-col :span="4" class="form-col">
|
|
|
<a-form-item
|
|
|
ref="externalApply"
|
|
|
label="是否外部申请"
|
|
|
@@ -277,7 +293,12 @@
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="6" class="form-col">
|
|
|
- <a-form-item ref="searched" label="立即发起审核" name="searched" class="label-form-item">
|
|
|
+ <a-form-item
|
|
|
+ ref="searched"
|
|
|
+ label="立即发起审核"
|
|
|
+ name="searched"
|
|
|
+ class="label-form-item"
|
|
|
+ >
|
|
|
<a-switch
|
|
|
checked-children=""
|
|
|
un-checked-children=""
|
|
|
@@ -323,6 +344,7 @@ import {
|
|
|
respDept,
|
|
|
collectDept,
|
|
|
EPSGCodes,
|
|
|
+ ApplProcesses,
|
|
|
} from '../sysDic';
|
|
|
import { session } from '/@/utils/Memory.js';
|
|
|
const props = {
|
|
|
@@ -356,7 +378,8 @@ interface FormState {
|
|
|
searched: boolean;
|
|
|
externalApply: boolean;
|
|
|
date1: undefined;
|
|
|
- immExaim: boolean; //是否立即发起审核
|
|
|
+ immExaim: boolean; //是否立即发起审核
|
|
|
+ shsqlc: string;
|
|
|
}
|
|
|
export default defineComponent({
|
|
|
name: 'SourceDetail',
|
|
|
@@ -375,6 +398,7 @@ export default defineComponent({
|
|
|
respDept: respDept, //责任科室
|
|
|
collectDept: collectDept, //保管部门
|
|
|
EPSGCodes: EPSGCodes, //EPSGCode
|
|
|
+ ApplProcesses: ApplProcesses, //适合申请流程
|
|
|
});
|
|
|
const formRef = ref();
|
|
|
const formState: UnwrapRef<FormState> = reactive({
|
|
|
@@ -403,7 +427,8 @@ export default defineComponent({
|
|
|
searched: true,
|
|
|
externalApply: true,
|
|
|
date1: undefined,
|
|
|
- immExaim:true,
|
|
|
+ immExaim: true,
|
|
|
+ shsqlc: '',
|
|
|
});
|
|
|
const moment = Moment;
|
|
|
const rules = {
|
|
|
@@ -437,7 +462,7 @@ export default defineComponent({
|
|
|
() => props.formData,
|
|
|
(obj) => {
|
|
|
data.detail = obj;
|
|
|
- console.log('查询数据',data.detail)
|
|
|
+ console.log('查询数据', data.detail);
|
|
|
if (data.isUpdate) setFormData();
|
|
|
}
|
|
|
);
|
|
|
@@ -459,11 +484,10 @@ export default defineComponent({
|
|
|
formRef.value
|
|
|
.validate()
|
|
|
.then(async () => {
|
|
|
- //console.log('values', formState, toRaw(formState));
|
|
|
const params = setSubmitForm();
|
|
|
if (params) {
|
|
|
if (data.isUpdate) {
|
|
|
- params['serviceid'] = data.detail.serviceid;
|
|
|
+ //params['serviceid'] = data.detail.serviceid;
|
|
|
const res = await updateService(params);
|
|
|
if (res && res?.status !== '-1') {
|
|
|
createMessage.success('修改地图资源成功!');
|
|
|
@@ -472,14 +496,13 @@ export default defineComponent({
|
|
|
} else createMessage.error('修改地图资源失败!,失败原因:' + res?.message, 1);
|
|
|
} else {
|
|
|
const res = await insertService(params);
|
|
|
- debugger
|
|
|
if (res && res?.status === '0') {
|
|
|
//立即发起审核
|
|
|
- if(formState.immExaim){
|
|
|
- const result = JSON.parse(res['result'])
|
|
|
- console.log('发起流程审核工作',result)
|
|
|
- const serviceid = result.sucList[0].servicebase.serviceid
|
|
|
- console.log('业务id',serviceid)
|
|
|
+ if (formState.immExaim) {
|
|
|
+ const result = JSON.parse(res['result']);
|
|
|
+ console.log('发起流程审核工作', result);
|
|
|
+ const serviceid = result.sucList[0].servicebase.serviceid;
|
|
|
+ console.log('业务id', serviceid);
|
|
|
}
|
|
|
createMessage.success('新增地图资源成功!');
|
|
|
resetForm();
|
|
|
@@ -510,55 +533,65 @@ export default defineComponent({
|
|
|
const secretlevels = secrets.find((item) => item.code === formState.secrets);
|
|
|
const coor = sysCoors.find((item) => item.GEOMNAME === formState.coordinate);
|
|
|
const EPSGCode = EPSGCodes.find((item) => item.code === formState.epsgcode);
|
|
|
+ let servicebase = {
|
|
|
+ publisher: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
+ username: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
+ userid: userinfo?.EMPLOYEE?.EMPLOYEE_ID, //'27AF004A-8BDN-885T-30FU-89DE3388762B',
|
|
|
+ servicealiasname: formState.servicealiasname, //资源别名
|
|
|
+ description: formState.description, //资源描述
|
|
|
+ ispublic: formState.public ? '1' : '0', //是否公开
|
|
|
+ searched: formState.searched ? '1' : '0', //是否展示
|
|
|
+ servicetype: formState.servicetype, //资源类型
|
|
|
+ externalApply: formState.externalApply ? '1' : '0', //外部申请
|
|
|
+ runtimestatus: formState.runtimestatus ? '1' : '0', //运行状态
|
|
|
+ servicename: formState.servicename, //资源名
|
|
|
+ mapingurl: formState.mapingurl, //服务地址
|
|
|
+ otherService: '',
|
|
|
+ };
|
|
|
+ let metadata = {
|
|
|
+ mapingurl: formState.mapingurl, //服务地址
|
|
|
+ name: formState.servicename, //资源名
|
|
|
+ servicealiasname: formState.servicealiasname, //资源别名
|
|
|
+ thumbnail: '',
|
|
|
+ description: formState.description,
|
|
|
+ keywords: formState.keywords,
|
|
|
+ servicetype: formState.servicetype, //资源类型
|
|
|
+ dataScope: formState.dataScope, //数据范围
|
|
|
+ updateType: formState.updateType, //更新方式
|
|
|
+ source: formState.source, //数据来源
|
|
|
+ formdatabase: formState.formdatabase, //数据表
|
|
|
+ rboffice: rboffices ? rboffices.codeName : '', //责任单位
|
|
|
+ keepingunit: collect ? collect.codeName : '', //保管单位
|
|
|
+ secretlevel: secretlevels ? secretlevels.codeName : '',
|
|
|
+ crs: coor ? coor.GEOMNAME : '',
|
|
|
+ epsgCode: EPSGCode ? EPSGCode.codeName : '',
|
|
|
+ workSpace: '',
|
|
|
+ runtimestatus: formState.runtimestatus ? '1' : '0', //运行状态
|
|
|
+ ishistory: '0',
|
|
|
+ shsqlc: formState.shsqlc,
|
|
|
+ urlInfo: '',
|
|
|
+ otherService: '',
|
|
|
+ bz: '',
|
|
|
+ ispublic: formState.public ? '1' : '0', //是否公开
|
|
|
+ searched: formState.searched ? '1' : '0', //是否展示
|
|
|
+ externalApply: formState.externalApply ? '1' : '0', //外部申请
|
|
|
+ isShow: formState.share ? '1' : '0',
|
|
|
+ publisher: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
+ username: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
+ userid: userinfo?.EMPLOYEE?.EMPLOYEE_ID, //'27AF004A-8BDN-885T-30FU-89DE3388762B',
|
|
|
+ };
|
|
|
+ if(data.isUpdate){
|
|
|
+ Object.assign(servicebase,{serviceid:data.detail.serviceid})
|
|
|
+
|
|
|
+ Object.assign(metadata,{
|
|
|
+ serviceid:data.detail.serviceid,
|
|
|
+ id:data.detail.id,
|
|
|
+ })
|
|
|
+ }
|
|
|
return {
|
|
|
type: 'MR',
|
|
|
- servicebase: {
|
|
|
- publisher: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
- username: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
- userid: userinfo?.EMPLOYEE?.EMPLOYEE_ID, //'27AF004A-8BDN-885T-30FU-89DE3388762B',
|
|
|
- servicealiasname: formState.servicealiasname, //资源别名
|
|
|
- description: formState.description, //资源描述
|
|
|
- ispublic: formState.public ? '1' : '0', //是否公开
|
|
|
- searched: formState.searched ? '1' : '0', //是否展示
|
|
|
- servicetype: formState.servicetype, //资源类型
|
|
|
- externalApply: formState.externalApply ? '1' : '0', //外部申请
|
|
|
- runtimestatus: formState.runtimestatus ? '1' : '0', //运行状态
|
|
|
- servicename: formState.servicename, //资源名
|
|
|
- mapingurl: formState.mapingurl, //服务地址
|
|
|
- otherService: '',
|
|
|
- },
|
|
|
- metadata: {
|
|
|
- mapingurl: formState.mapingurl, //服务地址
|
|
|
- name: formState.servicename, //资源名
|
|
|
- servicealiasname: formState.servicealiasname, //资源别名
|
|
|
- thumbnail: '',
|
|
|
- description: formState.description,
|
|
|
- keywords: formState.keywords.toString(),
|
|
|
- servicetype: formState.servicetype, //资源类型
|
|
|
- dataScope: formState.dataScope, //数据范围
|
|
|
- updateType: formState.updateType, //更新方式
|
|
|
- source: formState.source, //数据来源
|
|
|
- formdatabase: formState.formdatabase, //数据表
|
|
|
- rboffice: rboffices ? rboffices.codeName : '', //责任单位
|
|
|
- keepingunit: collect ? collect.codeName : '', //保管单位
|
|
|
- secretlevel: secretlevels ? secretlevels.codeName : '',
|
|
|
- crs: coor ? coor.GEOMNAME : '',
|
|
|
- epsgCode: EPSGCode ? EPSGCode.codeName : '',
|
|
|
- workSpace: '',
|
|
|
- runtimestatus: formState.runtimestatus ? '1' : '0', //运行状态
|
|
|
- ishistory: '0',
|
|
|
- shsqlc: 'ggdata',
|
|
|
- urlInfo: '',
|
|
|
- otherService: '',
|
|
|
- bz: '',
|
|
|
- ispublic: formState.public ? '1' : '0', //是否公开
|
|
|
- searched: formState.searched ? '1' : '0', //是否展示
|
|
|
- externalApply: formState.externalApply ? '1' : '0', //外部申请
|
|
|
- isShow: formState.share ? '1' : '0',
|
|
|
- publisher: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
- username: userinfo?.EMPLOYEE?.NAME, //'系统管理员',
|
|
|
- userid: userinfo?.EMPLOYEE?.EMPLOYEE_ID, //'27AF004A-8BDN-885T-30FU-89DE3388762B',
|
|
|
- },
|
|
|
+ servicebase,
|
|
|
+ metadata,
|
|
|
sourcetraces: [],
|
|
|
dataVersionConf: {},
|
|
|
};
|
|
|
@@ -567,48 +600,44 @@ export default defineComponent({
|
|
|
* 设置表单数据
|
|
|
*/
|
|
|
const setFormData = () => {
|
|
|
- // console.log('表单数据请看', data.detail);
|
|
|
- // console.log('服务类型', serviceTypes);
|
|
|
- // console.log('服务标签', serviceTags);
|
|
|
- // console.log('密级', secrets);
|
|
|
- // console.log('坐标系', sysCoors);
|
|
|
- // console.log('责任科室', respDept);
|
|
|
- // console.log('保管部门', collectDept);
|
|
|
- // console.log('EPSGCodes', EPSGCodes);
|
|
|
formState.public = data.detail.ispublic === '1' ? true : false;
|
|
|
formState.servicename = data.detail?.servicename;
|
|
|
- formState.publishtime = data.detail?.publishdate ? moment(data.detail?.publishdate).format('YYYY-MM-DD HH:mm:ss'): '';
|
|
|
+ formState.publishtime = data.detail?.publishdate
|
|
|
+ ? moment(data.detail?.publishdate).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ : '';
|
|
|
formState.publisher = data.detail?.publisher;
|
|
|
formState.runtimestatus = data.detail.runtimestatus === '0' ? false : true;
|
|
|
formState.servicealiasname = data.detail?.servicealiasname;
|
|
|
formState.code = data.detail?.serviceid;
|
|
|
formState.servicetype = data.detail?.servicetype;
|
|
|
- formState.updatetime = data.detail?.updatedate ? moment(data.detail?.updatedate).format('YYYY-MM-DD HH:mm:ss') : '';
|
|
|
+ formState.updatetime = data.detail?.updatedate
|
|
|
+ ? moment(data.detail?.updatedate).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ : '';
|
|
|
formState.coordinate = data.detail?.crs;
|
|
|
formState.searched = data.detail.searched === '0' ? false : true;
|
|
|
-
|
|
|
formState.keywords = data.detail?.keywords;
|
|
|
formState.description = data.detail?.description;
|
|
|
- formState.mapingurl = data.detail?.mapingurl
|
|
|
- formState.dataScope = data.detail?.dataScope
|
|
|
- formState.source = data.detail?.source
|
|
|
- formState.secrets = data.detail?.secretlevel
|
|
|
- formState.formdatabase = data.detail?.formdatabase
|
|
|
- formState.collect = data.detail?.keepingunit
|
|
|
- formState.respUnit = data.detail?.rboffice
|
|
|
- formState.updateType = data.detail?.updateType
|
|
|
- formState.epsgcode = data.detail?.epsgCode
|
|
|
- formState.share = data.detail.servicetypepublic === '0' ? false : true
|
|
|
- formState.externalApply = data.detail.externalApply === '0' ? false : true
|
|
|
- formState.immExaim = data.detail.ishistory === '0' ? false : true
|
|
|
+ formState.mapingurl = data.detail?.mapingurl;
|
|
|
+ formState.dataScope = data.detail?.dataScope;
|
|
|
+ formState.source = data.detail?.source;
|
|
|
+ formState.secrets = data.detail?.secretlevel;
|
|
|
+ formState.formdatabase = data.detail?.formdatabase;
|
|
|
+ formState.collect = data.detail?.keepingunit;
|
|
|
+ formState.respUnit = data.detail?.rboffice;
|
|
|
+ formState.updateType = data.detail?.updateType;
|
|
|
+ formState.epsgcode = data.detail?.epsgCode;
|
|
|
+ formState.shsqlc = data.detail?.shsqlc;
|
|
|
+ formState.share = data.detail.servicetypepublic === '0' ? false : true;
|
|
|
+ formState.externalApply = data.detail.externalApply === '0' ? false : true;
|
|
|
+ formState.immExaim = data.detail.ishistory === '0' ? false : true;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 上传缩略图改变
|
|
|
- */
|
|
|
- const uploadFilesChange = (file,fileList,evelt) => {
|
|
|
- console.log('上传缩略图改变',file,fileList)
|
|
|
- }
|
|
|
+ */
|
|
|
+ const uploadFilesChange = (file, fileList, evelt) => {
|
|
|
+ console.log('上传缩略图改变', file, fileList);
|
|
|
+ };
|
|
|
|
|
|
onMounted(() => {
|
|
|
resetForm();
|