|
@@ -3,38 +3,17 @@
|
|
|
<el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
|
|
|
<el-col :span="24" class="one">
|
|
|
<cForm :span="24" :fields="formFields" :form="form" :rules="{}" @save="toSave" label-width="auto">
|
|
|
- <template #b_time>
|
|
|
- <el-time-picker
|
|
|
- v-model="form.b_time"
|
|
|
- is-range
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- format="HH:mm"
|
|
|
- value-format="HH:mm"
|
|
|
- />
|
|
|
+ <template #logo>
|
|
|
+ <cUpload model="img" :list="form.logo" :limit="1" url="/files/notarization/config/upload" listType="picture-card" @change="onUpload"></cUpload>
|
|
|
</template>
|
|
|
- <template #l_time>
|
|
|
- <el-time-picker
|
|
|
- v-model="form.l_time"
|
|
|
- is-range
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- format="HH:mm"
|
|
|
- value-format="HH:mm"
|
|
|
- />
|
|
|
+ <template #brief>
|
|
|
+ <cEditor v-model="form.brief" url="/files/notarization/config/upload"></cEditor>
|
|
|
</template>
|
|
|
- <template #d_time>
|
|
|
- <el-time-picker
|
|
|
- v-model="form.d_time"
|
|
|
- is-range
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- format="HH:mm"
|
|
|
- value-format="HH:mm"
|
|
|
- />
|
|
|
+ <template #notice>
|
|
|
+ <cEditor v-model="form.notice" url="/files/notarization/config/upload"></cEditor>
|
|
|
+ </template>
|
|
|
+ <template #agreement>
|
|
|
+ <cEditor v-model="form.agreement" url="/files/notarization/config/upload"></cEditor>
|
|
|
</template>
|
|
|
</cForm>
|
|
|
</el-col>
|
|
@@ -86,11 +65,21 @@ const toSave = async () => {
|
|
|
// #region 表单及操作
|
|
|
// NeedChange
|
|
|
const formFields: Ref<any> = ref([
|
|
|
- { label: '早餐时间', model: 'b_time', custom: true },
|
|
|
- { label: '午餐时间', model: 'l_time', custom: true },
|
|
|
- { label: '晚餐时间', model: 'd_time', custom: true }
|
|
|
+ { label: 'logo', model: 'logo', custom: true },
|
|
|
+ { label: '联系电话', model: 'phone' },
|
|
|
+ { label: '邮箱', model: 'email' },
|
|
|
+ { label: '工作时间', model: 'time' },
|
|
|
+ { label: '地址', model: 'address', type: 'textarea' },
|
|
|
+ { label: '平台简介', model: 'brief', custom: true },
|
|
|
+ { label: '办证须知', model: 'notice', custom: true },
|
|
|
+ { label: '用户协议', model: 'agreement', custom: true }
|
|
|
]);
|
|
|
-const form: Ref<any> = ref({ b_time: [], l_time: [], d_time: [] });
|
|
|
+const form: Ref<any> = ref({ logo: [] });
|
|
|
+const onUpload = (e: { model: string; value: Array<[]> }) => {
|
|
|
+ console.log(e);
|
|
|
+ const { model, value } = e;
|
|
|
+ form.value[model] = value;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped></style>
|