| | |
| | | BaseContentLayout: typeof import('./components/core/BaseContentLayout.vue')['default'] |
| | | BasePanelLayout: typeof import('./components/core/BasePanelLayout.vue')['default'] |
| | | Content: typeof import('./components/core/Content.vue')['default'] |
| | | copy: typeof import('./components/search-option/FYOptionLocation copy.vue')['default'] |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
| | | ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
| | | ElBacktop: typeof import('element-plus/es')['ElBacktop'] |
| | |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElTransfer: typeof import('element-plus/es')['ElTransfer'] |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | | FormCol: typeof import('./components/layout/FormCol.vue')['default'] |
| | |
| | | * å¯ä¼ å
¥åå§è¡¨åæ°æ®formInfoï¼è¡¨åæ ¡éªè§årules |
| | | * å®ç°submitåcancel触å彿° |
| | | */ |
| | | import { defineProps, defineEmits, reactive, ref, watch, computed } from 'vue'; |
| | | import { defineProps, defineEmits, reactive, ref, watch, computed, defineExpose } from 'vue'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | |
| | | const props = defineProps({ |
| | |
| | | _locations: [ |
| | | { |
| | | required: true, |
| | | message: 'ç/å¸/åº/éä¸è½ä¸ºç©º', |
| | | // message: 'è¡æ¿åºåä¸è½ä¸ºç©º', |
| | | trigger: 'change', |
| | | validator: (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error('Please input the age')); |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | _scenetype: [ |
| | | { |
| | | required: true, |
| | | message: 'åºæ¯ç±»åä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | trigger: 'change', |
| | | validator: (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error('Please input the age')); |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }); |
| | |
| | | function submit() { |
| | | loading.value = true; |
| | | return new Promise((resolve, reject) => { |
| | | emit('submit', formObj, () => { |
| | | loading.value = false; |
| | | resolve(); |
| | | },(err)=>{ |
| | | loading.value = false; |
| | | reject(err); |
| | | }); |
| | | emit( |
| | | 'submit', |
| | | formObj, |
| | | () => { |
| | | loading.value = false; |
| | | resolve(); |
| | | }, |
| | | (err) => { |
| | | loading.value = false; |
| | | reject(err); |
| | | } |
| | | ); |
| | | }); |
| | | } |
| | | |
| | |
| | | emit('cancel'); |
| | | } |
| | | |
| | | const allRules = computed(()=>{ |
| | | return {...baseRules, ...props.rules} |
| | | }) |
| | | const allRules = computed(() => { |
| | | return { ...baseRules, ...props.rules }; |
| | | }); |
| | | |
| | | //çå¬è¡¨ååå§æ°æ®ä¼ å
¥ |
| | | watch( |
| | |
| | | (nValue) => { |
| | | formObj.value = nValue; |
| | | }, |
| | | { deep: false, immediate: true } |
| | | { deep: true, immediate: true } |
| | | ); |
| | | |
| | | //çå¬è¡¨åéç½®åè½è§¦å |
| | |
| | | watch(edit, (nValue) => { |
| | | emit('update:isEdit', nValue); |
| | | }); |
| | | |
| | | defineExpose({ onSubmit, onCancel, onReset }); |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // æ¥è¯¢çè¡æ¿çº§å«ï¼åå¼1ï¼2ï¼3ï¼4 |
| | | // æ¥è¯¢çè¡æ¿çº§å«ï¼åå¼1ï¼2ï¼3ï¼4, 5, 6 |
| | | level: { |
| | | type: Number, |
| | | default: 4 |
| | |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | prop: String |
| | | prop: { |
| | | type: String, |
| | | default: '_locations' |
| | | } |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | prop: String |
| | | prop: { |
| | | type: String, |
| | | default: '_scenetype' |
| | | } |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | |
| | | <template> |
| | | <el-form-item label="æ¶é´"> |
| | | <el-form-item label="æ¶é´" :prop="prop"> |
| | | <el-date-picker |
| | | :model-value="value" |
| | | @change="handleChange" |
| | |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | prop: String |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | |
| | | placeholder="ç¨æ·ç±»å" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="s in userTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | <el-option v-for="s in userTypes" :key="s.value" :label="s.label" :value="s" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | // æ¯å¦å¨é¦é项夿·»å âå
¨é¨âé项 |
| | | allOption: { |
| | | type: Boolean, |
| | | default: true, |
| | | default: true |
| | | }, |
| | | // è¿åç»æ |
| | | value: Object, |
| | | // æ¯å¦é»è®¤è¿ååå§é项 |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true, |
| | | default: true |
| | | }, |
| | | prop: String |
| | | prop: { |
| | | type: String, |
| | | default: '_usertype' |
| | | } |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | userTypes: enumUser(this.allOption), |
| | | userTypes: enumUser(this.allOption) |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | if (this.initValue) { |
| | | this.handleChange(this.userTypes[0]); |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | }; |
| | | |
| | | // æäº¤è¡¨å |
| | | const onSubmit = function () { |
| | | formRef.value.validate((valid) => { |
| | | const onSubmit = function (messageBox = true) { |
| | | formRef.value.validate(async (valid) => { |
| | | if (valid) { |
| | | if (messageBox) { |
| | | useMessageBoxTip({ |
| | | confirmMsg: submit.msg, |
| | | confirmTitle: submit.title, |
| | |
| | | return res; |
| | | } |
| | | }); |
| | | } else { |
| | | await submit.do(); |
| | | submited(); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | |
| | | const shape = { |
| | | radius: 9, |
| | | d() { |
| | | return this.radius * 2; |
| | | }, |
| | | p: () => 2 * Math.PI * this.radius, |
| | | }; |
| | | // const shape = { |
| | | // radius: 9, |
| | | // d() { |
| | | // return this.radius * 2; |
| | | // }, |
| | | // p: () => 2 * Math.PI * this.radius, |
| | | // }; |
| | | |
| | | console.log(shape.d()); |
| | | console.log(shape.p()); |
| | | // console.log(shape.d()); |
| | | // console.log(shape.p()); |
| | | |
| | | const str = 'abc'; |
| | | if (str[0] >= 'a' && str[0] <= 'z') { |
| | | let a = parseInt(str[0]); |
| | | a -= 32; |
| | | console.log(a); |
| | | } |
| | | // const str = 'abc'; |
| | | // if (str[0] >= 'a' && str[0] <= 'z') { |
| | | // let a = parseInt(str[0]); |
| | | // a -= 32; |
| | | // console.log(a); |
| | | // } |
| | | |
| | | |
| | | let a = 4 |
| | | let b = new Number(4) |
| | | let c = '4' |
| | | console.log(a == b); |
| | | console.log(a === b); |
| | | console.log(a == c); |
| | | console.log(b === c); |
| | |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .a { |
| | | color: #f7a62c; |
| | | } |
| | | </style> |
| | |
| | | <el-step title="è±å
æ¡ç®" /> |
| | | <el-step title="èªå¨è¯ä¼°" /> |
| | | </el-steps> |
| | | |
| | | <el-card v-if="stepIndex == 0" shadow="never"> |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">éæ©è¯ä¼°èå´</el-text></div> |
| | | <el-text size="small" type="info">å
æ¬åºå¿ãåºæ¯ç±»å以åæä»½</el-text> |
| | | </template> |
| | | <FYForm :form-info="evaConditon" :rules="evaConditionRules" :showButtons="false"> |
| | | <template #form-item="{ formObj }"> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | | :allOption="false" |
| | | :level="3" |
| | | :checkStrictly="false" |
| | | v-model:value="formObj.locations" |
| | | ></FYOptionLocation> |
| | | <!-- åºæ¯ç±»å --> |
| | | <FYOptionScene |
| | | :allOption="false" |
| | | :type="2" |
| | | v-model:value="formObj.scenetype" |
| | | ></FYOptionScene> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime |
| | | :initValue="true" |
| | | type="month" |
| | | v-model:value="formObj.time" |
| | | ></FYOptionTime> |
| | | </template> |
| | | </FYForm> |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | | <el-button type="primary" size="default">ä¸ä¸æ¥</el-button> |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | <el-card v-if="stepIndex == 1" shadow="never"> Never2 </el-card> |
| | | <el-card v-if="stepIndex == 2" shadow="never"> Never3 </el-card> |
| | | <el-card v-if="stepIndex == 3" shadow="never"> Never4 </el-card> |
| | | <CompCheckArea v-show="stepIndex == 0" v-model="stepIndex"></CompCheckArea> |
| | | <CompCheckSource v-show="stepIndex == 1" v-model="stepIndex"></CompCheckSource> |
| | | <CompCheckExemption v-show="stepIndex == 2" v-model="stepIndex"></CompCheckExemption> |
| | | <CompCheckConfirm v-show="stepIndex == 3" v-model="stepIndex"></CompCheckConfirm> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs'; |
| | | import CompCheckArea from './precheck/CompCheckArea.vue'; |
| | | import CompCheckSource from './precheck/CompCheckSource.vue'; |
| | | import CompCheckExemption from './precheck/CompCheckExemption.vue'; |
| | | import CompCheckConfirm from './precheck/CompCheckConfirm.vue'; |
| | | |
| | | /** |
| | | * èªå¨è¯ä¼°æ¡ä»¶åè§æ§æ£æ¥ |
| | | */ |
| | | export default { |
| | | name: 'CompPreCheck', |
| | | components: { CompCheckArea, CompCheckSource, CompCheckExemption, CompCheckConfirm }, |
| | | props: {}, |
| | | emits: ['preCheck'], |
| | | data() { |
| | | return { |
| | | // æä½æ¥éª¤ä¸æ |
| | | stepIndex: 0, |
| | | // è¯ä¼°ä»»å¡èå´ |
| | | evaConditon: {}, |
| | | evaConditionRules: { |
| | | acountname: [ |
| | | { |
| | | required: true, |
| | | message: 'è´¦æ·åä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | } |
| | | stepIndex: 0 |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | <template> |
| | | <el-row> |
| | | <span>å¿«æ·éæ©</span> |
| | | <el-button v-for="(v, i) in quickSetting" :key="i" type="primary" @click="quickSet(v)">{{ |
| | | <el-form-item label="å¿«æ·éæ©"> |
| | | <el-space> |
| | | <el-button v-for="(v, i) in quickSetting" :key="i" type="primary" size="small" @click="quickSet(v)">{{ |
| | | v.name |
| | | }}</el-button> |
| | | </el-row> |
| | | </el-space> |
| | | </el-form-item> |
| | | <!-- <el-row class="row"> |
| | | <el-space> |
| | | <el-text>å¿«æ·éæ©</el-text> |
| | | <el-button v-for="(v, i) in quickSetting" :key="i" type="primary" size="small" @click="quickSet(v)">{{ |
| | | v.name |
| | | }}</el-button> |
| | | </el-space> |
| | | </el-row> --> |
| | | </template> |
| | | <script> |
| | | export default { |
| | |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310106', |
| | | dName: 'éå®åº' |
| | | dName: 'éå®åº', |
| | | }, |
| | | scenetype: { label: 'å·¥å°', value: '1' } |
| | | }, |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .row { |
| | | padding: 8px 0px; |
| | | /* background-color: antiquewhite; */ |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card shadow="never"> |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">éæ©è¯ä¼°èå´</el-text></div> |
| | | <el-text size="small" type="info">å
æ¬åºå¿ãåºæ¯ç±»å以åæä»½</el-text> |
| | | </template> |
| | | <FYForm |
| | | ref="formRef" |
| | | :form-info="evaConditon" |
| | | :rules="evaConditionRules" |
| | | :showButtons="false" |
| | | @submit="nextStep" |
| | | > |
| | | <template #form-item="{ formObj }"> |
| | | <CompQuickSet @quick-set="setOptions"></CompQuickSet> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | | :allOption="false" |
| | | :level="3" |
| | | :initValue="false" |
| | | :checkStrictly="false" |
| | | v-model:value="formObj._locations" |
| | | ></FYOptionLocation> |
| | | <!-- åºæ¯ç±»å --> |
| | | <FYOptionScene |
| | | :allOption="false" |
| | | :initValue="false" |
| | | :type="2" |
| | | v-model:value="formObj._scenetype" |
| | | ></FYOptionScene> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime |
| | | prop="time" |
| | | :initValue="true" |
| | | type="month" |
| | | v-model:value="formObj.time" |
| | | ></FYOptionTime> |
| | | </template> |
| | | </FYForm> |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | | <el-button type="primary" size="default" :loading="loading" @click="submit" |
| | | >ä¸ä¸æ¥</el-button |
| | | > |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import CompQuickSet from '../CompQuickSet.vue'; |
| | | |
| | | /** |
| | | * è¯ä¼°èå´åè§æ§æ£æ¥ |
| | | */ |
| | | export default { |
| | | components: { CompQuickSet }, |
| | | props: { |
| | | // æ¥éª¤ä¸æ |
| | | modelValue: Number |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | // è¯ä¼°ä»»å¡èå´ |
| | | evaConditon: {}, |
| | | evaConditionRules: { |
| | | time: [ |
| | | { |
| | | required: true, |
| | | message: 'æ¶é´ä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | setOptions(param) { |
| | | this.evaConditon._locations = param.locations; |
| | | this.evaConditon._scenetype = param.scenetype; |
| | | }, |
| | | submit() { |
| | | this.$refs.formRef.onSubmit(false); |
| | | }, |
| | | // 跳转ä¸ä¸æ¥ |
| | | nextStep() { |
| | | this.loading = true; |
| | | return new Promise((reslove, reject) => { |
| | | setTimeout(() => { |
| | | this.$emit('update:modelValue', this.modelValue + 1); |
| | | this.loading = false; |
| | | reslove(); |
| | | }, 1000); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card shadow="never"> |
| | | Never4 |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | | <el-button type="primary" size="default" @click="lastStep">ä¸ä¸æ¥</el-button> |
| | | <!-- <el-button type="primary" size="default" @click="nextStep">ä¸ä¸æ¥</el-button> --> |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * è¯ä¼°ä»»å¡æç»å¼å¯ç¡®è®¤ |
| | | */ |
| | | export default { |
| | | props: { |
| | | // æ¥éª¤ä¸æ |
| | | modelValue: Number |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 跳转ä¸ä¸æ¥ |
| | | nextStep() { |
| | | this.$emit('update:modelValue', this.modelValue + 1); |
| | | }, |
| | | // 跳转ä¸ä¸æ¥ |
| | | lastStep() { |
| | | this.$emit('update:modelValue', this.modelValue - 1); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card shadow="never"> |
| | | Never3 |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | | <el-button type="primary" size="default" @click="lastStep">ä¸ä¸æ¥</el-button> |
| | | <el-button type="primary" size="default" @click="nextStep">ä¸ä¸æ¥</el-button> |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * è¯ä¼°æ¡ç®è±å
è®¾å® |
| | | */ |
| | | export default { |
| | | props: { |
| | | // æ¥éª¤ä¸æ |
| | | modelValue: Number |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 跳转ä¸ä¸æ¥ |
| | | nextStep() { |
| | | this.$emit('update:modelValue', this.modelValue + 1); |
| | | }, |
| | | // 跳转ä¸ä¸æ¥ |
| | | lastStep() { |
| | | this.$emit('update:modelValue', this.modelValue - 1); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card shadow="never"> |
| | | Never2 |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | | <el-button type="primary" size="default" @click="lastStep">ä¸ä¸æ¥</el-button> |
| | | <el-button type="primary" size="default" @click="nextStep">ä¸ä¸æ¥</el-button> |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * è¯ä¼°æ°æ®æºå®æ´æ§æ£æ¥ |
| | | */ |
| | | export default { |
| | | props: { |
| | | // æ¥éª¤ä¸æ |
| | | modelValue: Number |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 跳转ä¸ä¸æ¥ |
| | | nextStep() { |
| | | this.$emit('update:modelValue', this.modelValue + 1); |
| | | }, |
| | | // 跳转ä¸ä¸æ¥ |
| | | lastStep() { |
| | | this.$emit('update:modelValue', this.modelValue - 1); |
| | | } |
| | | } |
| | | }; |
| | | </script> |