From dd53612b39a83880a4b90efec5b500dc52c8a151 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Tue, 29 Aug 2023 10:34:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 14 +- .../question/components/QuestionForm.vue | 32 ++-- src/views/question/index.vue | 42 +++-- src/views/sch/place/index.vue | 22 +-- .../zs/clue/ClueForm/components/MapDialog.vue | 48 +++--- .../zs/clue/components/ClueFormDialog.vue | 27 +-- src/views/zs/sign/index.vue | 157 +++++++++--------- vue.config.js | 15 +- 8 files changed, 188 insertions(+), 169 deletions(-) diff --git a/public/index.html b/public/index.html index 4bbefa0..523cd90 100644 --- a/public/index.html +++ b/public/index.html @@ -95,10 +95,12 @@ - - - + // securityJsCode: '420463f2f8c849ab78b9d29548aff7d3' + securityJsCode: 'f653df5a2c5f44ae68faaab6f6a6b8ab' + }; + + + + + diff --git a/src/views/question/components/QuestionForm.vue b/src/views/question/components/QuestionForm.vue index dfb682c..cd15863 100644 --- a/src/views/question/components/QuestionForm.vue +++ b/src/views/question/components/QuestionForm.vue @@ -5,21 +5,22 @@ - {{ dialogForm.question }} +
{{ dialogForm.question }}
+
- a:{{ dialogForm.chooseA }} - b:{{ dialogForm.chooseB }} - c:{{ dialogForm.chooseC }} - d:{{ dialogForm.chooseD }} - e:{{ dialogForm.chooseE }} - f:{{ dialogForm.chooseF }} - g:{{ dialogForm.chooseG }} - + A:{{ dialogForm.chooseA }} + B:{{ dialogForm.chooseB }} + C:{{ dialogForm.chooseC }} + D:{{ dialogForm.chooseD }} + E:{{ dialogForm.chooseE }} + F:{{ dialogForm.chooseF }} + G:{{ dialogForm.chooseG }} + @@ -99,7 +100,7 @@ - 取消 + 取消 确定 @@ -109,7 +110,7 @@ import { updateQuestion } from '@/api/question'; export default { - data () { + data() { return { visible: false, canSubmit: true, @@ -130,7 +131,7 @@ export default { }; }, methods: { - init (info = undefined) { + init(info = undefined) { // debugger this.visible = true; this.$nextTick(() => { @@ -141,7 +142,7 @@ export default { } }); }, - resetDialogForm () { + resetDialogForm() { this.dialogForm = { questionId: undefined, isVip: 0, @@ -153,16 +154,17 @@ export default { examKeys: undefined }; }, - closeDialog () { + closeDialog() { this.$emit('update:dialogVisible', false); }, // 表单提交 - dialogFormSubmit () { + dialogFormSubmit() { this.$refs.dialogForm.validate((valid) => { if (valid) { updateQuestion(this.dialogForm).then(response => { if (response.code == 200) { this.$modal.msgSuccess('修改成功'); + this.$emit('update'); // this.visible = true; } }); diff --git a/src/views/question/index.vue b/src/views/question/index.vue index 7560308..8b52fe0 100644 --- a/src/views/question/index.vue +++ b/src/views/question/index.vue @@ -1,6 +1,6 @@ - + + + @@ -53,7 +57,7 @@ export default { components: { QuestionForm }, - data () { + data() { return { // 遮罩层 loading: false, @@ -67,12 +71,12 @@ export default { dialogVisible: false }; }, - created () { + created() { // this.getList(); }, methods: { /** 查询文件列表 */ - getList () { + getList() { this.loading = true; searchQuestion(this.queryParams).then(response => { this.tableList = response.data; @@ -82,15 +86,19 @@ export default { }, /** 搜索按钮操作 */ - handleQuery () { - this.getList(); + handleQuery() { + if (this.queryParams.question) { + this.getList(); + } else { + this.$modal.msgWarning('请输入题目'); + } }, /** 重置按钮操作 */ - resetQuery () { + resetQuery() { this.queryParams.question = ''; this.handleQuery(); }, - handleEdit (item) { + handleEdit(item) { this.dialogVisible = true; this.$nextTick(() => { this.$refs.dialogForm.init(item); diff --git a/src/views/sch/place/index.vue b/src/views/sch/place/index.vue index afeeb37..987ffa6 100644 --- a/src/views/sch/place/index.vue +++ b/src/views/sch/place/index.vue @@ -5,12 +5,12 @@ -
- +
+
驾校列表
-
+
{{ school.schoolName }}
@@ -94,7 +94,7 @@ - + 保存 @@ -102,7 +102,7 @@ - +
{{ placeListDialogTitle }} @@ -112,7 +112,7 @@ - +
@@ -139,8 +139,8 @@ -
{{ mapHelpText }}
- +
{{ mapHelpText }}
+
@@ -281,7 +281,8 @@ export default { }, // 导入地图 importMap() { - const url = 'https://webapi.amap.com/maps?v=1.4.15&key=f2f35d6adc4a16bb879d303cead56237&callback=onLoad'; + // const url = 'https://webapi.amap.com/maps?v=1.4.15&key=f2f35d6adc4a16bb879d303cead56237&callback=onLoad'; + const url = 'https://webapi.amap.com/maps?v=1.4.15&key=0e62be0896c6b8d27d453445f0fb8bc4&callback=onLoad'; var jsapi = document.createElement('script'); jsapi.charset = 'utf-8'; jsapi.src = url; @@ -477,7 +478,7 @@ export default { if (item.placeId) { return updatePlace(item); } else { - return addPlace(item) + return addPlace(item); } }, checkPlaceFormValidate() { @@ -739,6 +740,7 @@ export default { .actived-school { border: 2px solid #409eff !important; } + ::v-deep .el-radio__label { vertical-align: middle; } diff --git a/src/views/zs/clue/ClueForm/components/MapDialog.vue b/src/views/zs/clue/ClueForm/components/MapDialog.vue index 46ad97c..1ef60e2 100644 --- a/src/views/zs/clue/ClueForm/components/MapDialog.vue +++ b/src/views/zs/clue/ClueForm/components/MapDialog.vue @@ -19,11 +19,12 @@ export default { placeSearch: null, currentPoint: undefined, marker: null, - searchBody: undefined - } + searchBody: undefined, + geocoder: null + }; }, beforeDestroy() { - console.log("mapdialog----beforeDestroy") + console.log('mapdialog----beforeDestroy'); this.marker = null; this.placeSearch = null; @@ -31,23 +32,23 @@ export default { this.dialogMap = null; }, mounted() { - console.log("mounted") - this.initData() + console.log('mounted'); + this.initData(); }, created() { - console.log("created") + console.log('created'); }, methods: { initData(point = undefined) { - console.log(point) - this.visible = true + console.log(point); + this.visible = true; // this.searchBody = undefined this.$nextTick(() => { this.resetData(); if (point) { this.currentPoint = point; } - this.initMap() + this.initMap(); }); }, resetData() { @@ -55,10 +56,10 @@ export default { this.dialogMap && this.marker && this.dialogMap.remove(this.marker); this.marker = null; // this.placeSearch = null; - this.searchBody = null + this.searchBody = null; }, initMap() { - console.log("初始化地图") + console.log('初始化地图'); if (!this.dialogMap) { this.dialogMap = new AMap.Map('dialogMap', { zoom: 12, @@ -78,20 +79,19 @@ export default { }); this.dialogMap.addControl(new AMap.Scale()); const auto = new AMap.Autocomplete({ - input: 'search', // 前端搜索框 - }) + input: 'search' // 前端搜索框 + }); this.placeSearch = new AMap.PlaceSearch({ map: this.dialogMap, pageSize: 10, // 单页显示结果条数 pageIndex: 1, // 页码 - autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围 - }) - AMap.event.addListener(auto, 'select', this.select) + autoFitView: true // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围 + }); + AMap.event.addListener(auto, 'select', this.select); this.geocoder = new AMap.Geocoder(); } this.initMapCenter(); - }, // 初始化编辑地图的中心点 initMapCenter() { @@ -127,7 +127,7 @@ export default { } }); }, - //定位地址 + // 定位地址 regeoCode() { this.geocoder.getAddress( [this.currentPoint.lng, this.currentPoint.lat], @@ -141,11 +141,10 @@ export default { }, handleMapSave() { if (this.currentPoint.lat && this.currentPoint.lng) { - //通知父组件 - this.$emit("handleMapDialogPoint", this.currentPoint); + // 通知父组件 + this.$emit('handleMapDialogPoint', this.currentPoint); this.visible = false; this.$emit('update:mapDialogVisible', false); - } else { this.$message.error('请在地图上选择位置后保存!'); } @@ -153,8 +152,8 @@ export default { closeDialog() { this.$emit('update:mapDialogVisible', false); } - }, -} + } +}; \ No newline at end of file + diff --git a/src/views/zs/clue/components/ClueFormDialog.vue b/src/views/zs/clue/components/ClueFormDialog.vue index 93066a2..61cca40 100644 --- a/src/views/zs/clue/components/ClueFormDialog.vue +++ b/src/views/zs/clue/components/ClueFormDialog.vue @@ -157,7 +157,7 @@
- - - - \ No newline at end of file +} + diff --git a/src/views/zs/sign/index.vue b/src/views/zs/sign/index.vue index 0b08a01..2715335 100644 --- a/src/views/zs/sign/index.vue +++ b/src/views/zs/sign/index.vue @@ -1,10 +1,10 @@