|
|
@@ -29,7 +29,7 @@
|
|
|
<a-textarea v-model:value="formState.description" :rows="2" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="9" class="form-col">
|
|
|
+ <!-- <a-col :span="9" class="form-col">
|
|
|
<a-form-item ref="servicetype" label="适合申请流程" name="servicetype" class="label-form-item">
|
|
|
<a-select v-model:value="formState.servicetype">
|
|
|
<template v-for="(tag, index) in assemblyType" :key="index">
|
|
|
@@ -37,14 +37,27 @@
|
|
|
</template>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col> -->
|
|
|
<a-col :span="9" class="form-col">
|
|
|
- <a-form-item ref="servicetype" label="资源类型" name="servicetype" class="label-form-item">
|
|
|
+ <!-- <a-form-item ref="servicetype" label="资源类型" name="servicetype" class="label-form-item">
|
|
|
<a-select v-model:value="formState.servicetype">
|
|
|
<template v-for="(tag, index) in assemblyType" :key="index">
|
|
|
<a-select-option :value="tag.value">{{ tag.value }}</a-select-option>
|
|
|
</template>
|
|
|
</a-select>
|
|
|
+ </a-form-item> -->
|
|
|
+ <a-form-item ref="servicetype" label="资源类型" name="servicetype" class="label-form-item">
|
|
|
+ <a-select v-model:value="formState.servicetype">
|
|
|
+ <template v-for="tag in assemblyType" :key="tag.value">
|
|
|
+ <a-select-option :value="tag.value">{{ tag.label }}</a-select-option>
|
|
|
+ </template>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="9" class="form-col">
|
|
|
+ <a-form-item ref="crs" label="组内顺序" name="crs" class="label-form-item">
|
|
|
+ <a-input v-model:value="formState.crs" :rows="2" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!-- <a-col :span="9" class="form-col">
|
|
|
@@ -98,6 +111,7 @@ const props = {
|
|
|
isUpdate: { type: Boolean, default: ref(false) },
|
|
|
};
|
|
|
interface FormState {
|
|
|
+ source: '',
|
|
|
servicetype: string,
|
|
|
publiccurl: string;
|
|
|
servicename: string;
|
|
|
@@ -113,6 +127,7 @@ interface FormState {
|
|
|
searched: boolean;
|
|
|
externalApply: boolean;
|
|
|
date1: undefined;
|
|
|
+ crs: 0
|
|
|
}
|
|
|
export default defineComponent({
|
|
|
name: 'SourceDetail',
|
|
|
@@ -125,18 +140,11 @@ export default defineComponent({
|
|
|
fileList: [],
|
|
|
});
|
|
|
var assemblyType = ref([
|
|
|
- // { value: '地图基础功能' },
|
|
|
- // { value: '底图和模型加载' },
|
|
|
- // { value: '覆盖物' },
|
|
|
- // { value: '测量工具' },
|
|
|
- // { value: '绘制工具' },
|
|
|
- // { value: '空间分析' },
|
|
|
- // { value: '天气特效' },
|
|
|
- { value: '地图浏览工具' },
|
|
|
- { value: '服务加载工具' },
|
|
|
- { value: 'GIS功能工具' },
|
|
|
- { value: '空间分析工具' },
|
|
|
- { value: '三维可视化效果工具' },
|
|
|
+ { value: '地图浏览工具', label: '地图浏览工具', },
|
|
|
+ { value: '服务加载工具', label: '服务加载工具', },
|
|
|
+ { value: 'GIS功能工具', label: 'GIS功能工具', },
|
|
|
+ { value: '空间分析工具', label: '空间分析工具', },
|
|
|
+ { value: '三维可视化效果工具', label: '三维可视化效果工具', },
|
|
|
])
|
|
|
|
|
|
const formRef = ref();
|
|
|
@@ -156,6 +164,7 @@ export default defineComponent({
|
|
|
searched: true,
|
|
|
externalApply: true,
|
|
|
date1: undefined,
|
|
|
+ crs: 0
|
|
|
});
|
|
|
const moment = Moment;
|
|
|
const rules = {
|
|
|
@@ -164,11 +173,11 @@ export default defineComponent({
|
|
|
|
|
|
servicename: [
|
|
|
{ required: true, message: '请填写资源名称', trigger: 'blur' },
|
|
|
- { min: 3, max: 20, message: '长度必须在3到20个字符', trigger: 'blur' },
|
|
|
+ { min: 1, max: 20, message: '长度必须在3到20个字符', trigger: 'blur' },
|
|
|
],
|
|
|
servicealiasname: [
|
|
|
{ required: true, message: '请输入资源别名', trigger: 'blur' },
|
|
|
- { min: 3, max: 20, message: '长度必须在3到20个字符', trigger: 'blur' },
|
|
|
+ { min: 1, max: 20, message: '长度必须在3到20个字符', trigger: 'blur' },
|
|
|
],
|
|
|
systag: [{ required: true, message: '请选择系统标签', trigger: 'change' }],
|
|
|
date1: [{ required: true, message: 'Please pick a date', trigger: 'change', type: 'object' }],
|
|
|
@@ -188,13 +197,14 @@ export default defineComponent({
|
|
|
() => props.formData,
|
|
|
(obj) => {
|
|
|
data.detail = obj;
|
|
|
- if (data.isUpdate) setFormData();
|
|
|
+ if (data.isUpdate) setFormData()
|
|
|
}
|
|
|
);
|
|
|
watch(
|
|
|
() => props.isUpdate,
|
|
|
(obj) => {
|
|
|
data.isUpdate = obj;
|
|
|
+ if (!data.isUpdate) resetForm()
|
|
|
}
|
|
|
);
|
|
|
const submitForm = () => {
|
|
|
@@ -261,8 +271,10 @@ export default defineComponent({
|
|
|
source: formState.servicetype, //资源类型
|
|
|
mapingurl: formState.mapingurl, //服务地址
|
|
|
publiccurl: formState.publiccurl, //数据表
|
|
|
+ crs: formState.crs,//小组类顺序
|
|
|
},
|
|
|
metadata: {
|
|
|
+ crs: formState.crs,//小组类顺序
|
|
|
publiccurl: formState.publiccurl, //数据表
|
|
|
source: formState.servicetype, //资源类型
|
|
|
mapingurl: formState.mapingurl, //服务地址
|
|
|
@@ -294,6 +306,10 @@ export default defineComponent({
|
|
|
formState.public = data.detail.ispublic === '1' ? true : false;
|
|
|
formState.servicename = data.detail?.servicename;
|
|
|
formState.publiccurl = data.detail?.publiccurl;
|
|
|
+ formState.servicetype = data.detail?.source;
|
|
|
+ formState.crs = data.detail?.crs;
|
|
|
+ formState.description = data.detail?.description;
|
|
|
+ formState.publishtime = data.detail?.publishdate
|
|
|
formState.publishtime = data.detail?.publishdate
|
|
|
? moment(data.detail?.publishdate).format('YYYY-MM-DD HH:mm:ss')
|
|
|
: '';
|