Browse Source

fix:修改地址联动

master
123456 3 years ago
parent
commit
52756db412
  1. 132
      src/views/modules/plugins/point/icpointNoice.vue
  2. 9
      src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
  3. 35
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue
  4. 11
      src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
  5. 35
      src/views/modules/plugins/point/icpointvaccinesinoculation.vue

132
src/views/modules/plugins/point/icpointNoice.vue

@ -1,17 +1,19 @@
<template> <template>
<div class="epidemic-form"> <div class="epidemic-form">
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<el-form
<el-form ref="ref_form1" ref="ref_form1"
:inline="true" :inline="true"
:model="formData" :model="formData"
:rules="dataRule" :rules="dataRule"
class="form"> class="form"
>
<el-form-item label="通知渠道" <el-form-item
label="通知渠道"
prop="isSelChannel" prop="isSelChannel"
label-width="150px" label-width="150px"
style="display: block"> style="display: block"
>
<span>小程序通知</span> <span>小程序通知</span>
<!-- <el-checkbox v-model="formData.isSelChannel" <!-- <el-checkbox v-model="formData.isSelChannel"
key="0" key="0"
@ -25,46 +27,46 @@
</el-checkbox-group> --> </el-checkbox-group> -->
</el-form-item> </el-form-item>
<el-form-item label="通知内容" <el-form-item
label="通知内容"
prop="content" prop="content"
label-width="150px" label-width="150px"
style="display: block"> style="display: block"
<el-input class="item_width_1" >
<el-input
class="item_width_1"
type="textarea" type="textarea"
maxlength="500" maxlength="500"
show-word-limit show-word-limit
:autosize="{ minRows: 10, maxRows: 15 }" :autosize="{ minRows: 10, maxRows: 15 }"
clearable clearable
placeholder="请输入通知内容" placeholder="请输入通知内容"
v-model="formData.content"></el-input> v-model="formData.content"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="form_div_btn"> <div class="form_div_btn">
<el-button size="small" <el-button size="small" @click="handleCancle"> </el-button>
@click="handleCancle"> </el-button> <el-button
<el-button size="small" size="small"
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"
> </el-button
>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { Loading } from "element-ui"; // Loading
import { Loading } from 'element-ui' // Loading let loading; //
let loading //
export default { export default {
data() { data() {
return { return {
activeName: "second", activeName: "second",
gridList: [], gridList: [],
@ -72,67 +74,105 @@ export default {
btnDisable: false, btnDisable: false,
formData: { formData: {
origin: '1', origin: "1",
isSelChannel: false, isSelChannel: false,
channel: [], channel: [],
content: '', content: "",
userList: [], userList: [],
}, },
selectionAll: [] selectionAll: [],
};
}
}, },
components: {}, components: {},
async mounted () { async mounted() {},
methods: {
handleCancle() {
this.$emit("diaClose");
}, },
async handleComfirm() {
this.formData.channel = ["0"];
if (!this.formData.content) {
this.$message({
type: "warning",
message: "请填写通知内容",
});
return false;
}
methods: { console.log(this.formData);
// return false
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
}, 5000);
let url = "";
url = "/epmetuser/icNotice/sendPointNotice";
const { data, code, msg } = await requestPost(url, this.formData);
if (code === 0) {
this.$message({
type: "success",
message: "操作成功",
});
this.resetData();
this.btnDisable = false;
this.handleCancle();
} else {
this.btnDisable = false;
this.$message.error(msg);
}
},
resetData() {
this.formData = {
origin: "2",
isSelChannel: false,
channel: [],
content: "",
userList: [],
};
},
// //
startLoading() { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: '正在加载……', // text: "正在加载……", //
background: 'rgba(0,0,0,.7)' // background: "rgba(0,0,0,.7)", //
}) });
}, },
// //
endLoading() { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close() loading.close();
}
} }
}, },
},
computed: { computed: {
dataRule() { dataRule() {
return { return {
channel: [ channel: [
{ required: true, message: '通知渠道不能为空', trigger: 'blur' } { required: true, message: "通知渠道不能为空", trigger: "blur" },
], ],
content: [ content: [
{ required: true, message: '通知内容不能为空', trigger: 'blur' } { required: true, message: "通知内容不能为空", trigger: "blur" },
] ],
} };
}, },
}, },
props: { props: {
// serviceList: { // serviceList: {
// type: Array, // type: Array,
// default: [] // default: []
// }, // },
} },
} };
</script> </script>

9
src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue

@ -202,7 +202,6 @@ export default {
}, },
mounted() { mounted() {
this.getFormInfo(); this.getFormInfo();
this.initMap();
}, },
methods: { methods: {
closeSubmit(){ closeSubmit(){
@ -219,7 +218,8 @@ export default {
// init // init
initMap() { initMap() {
// //
var center = new window.TMap.LatLng(36.0722275, 120.38945519); let _this = this
var center = new window.TMap.LatLng(_this.dataForm.latitude, _this.dataForm.longitude);
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_add"), { map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, // center: center, //
@ -339,6 +339,10 @@ export default {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo(); this.getInfo();
}else{
this.dataForm.ongitude = "120.38945519"
this.dataForm.latitude = "36.0722275"
this.initMap();
} }
}); });
}, },
@ -355,6 +359,7 @@ export default {
...this.dataForm, ...this.dataForm,
...res.data, ...res.data,
}; };
this.initMap();
}) })
.catch(() => {}); .catch(() => {});
}, },

35
src/views/modules/plugins/point/icpointnucleicmonitoring.vue

@ -100,6 +100,13 @@
>导入核酸监测点数据</el-button >导入核酸监测点数据</el-button
> >
</el-upload> </el-upload>
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
>发送通知</el-button
>
</div> </div>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
@ -193,12 +200,25 @@
@closeDialog="closeDialog" @closeDialog="closeDialog"
></add-or-update> ></add-or-update>
</el-dialog> </el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog :visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<icpoint-noice ref="ref_sendnotice"
@diaClose="diaClose"></icpoint-noice>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import mixinViewModule from "@/mixins/view-module"; import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointnucleicmonitoring-add-or-update"; import AddOrUpdate from "./icpointnucleicmonitoring-add-or-update";
import icpointNoice from './icpointNoice'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
@ -218,15 +238,28 @@ export default {
organizationList: [], organizationList: [],
orgIds: [], orgIds: [],
updateId: null, updateId: null,
sendNoticeFormShow:false,
}; };
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
icpointNoice
}, },
created() { created() {
this.getFormInfo(); this.getFormInfo();
}, },
methods: { methods: {
//
handleSendNotice () {
this.sendNoticeFormShow = true
this.$nextTick(() => {
this.$refs.ref_sendnotice.initForm(this.selectionAll, '3')
})
},
//
diaClose(){
this.sendNoticeFormShow = false
},
// / // /
addOrUpdateHandle(id) { addOrUpdateHandle(id) {
this.updateId = id; this.updateId = id;
@ -239,7 +272,7 @@ export default {
// //
closeDialog() { closeDialog() {
this.addOrUpdateVisible = false; this.addOrUpdateVisible = false;
this.uploadId = null; this.updateId = null;
}, },
// //
getFormInfo() { getFormInfo() {

11
src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue

@ -252,9 +252,6 @@ export default {
}; };
}, },
}, },
mounted() {
this.initMap();
},
methods: { methods: {
closeSubmit(){ closeSubmit(){
this.$emit('closeDialog') this.$emit('closeDialog')
@ -262,7 +259,8 @@ export default {
// init // init
initMap() { initMap() {
// //
var center = new window.TMap.LatLng(36.0722275, 120.38945519); let _this = this
var center = new window.TMap.LatLng(_this.dataForm.latitude, _this.dataForm.longitude);
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_app"), { map = new window.TMap.Map(document.getElementById("map_app"), {
center: center, // center: center, //
@ -383,6 +381,10 @@ export default {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo(); this.getInfo();
}else{
this.dataForm.ongitude = "120.38945519"
this.dataForm.latitude = "36.0722275"
this.initMap();
} }
}); });
}, },
@ -398,6 +400,7 @@ export default {
...this.dataForm, ...this.dataForm,
...res.data, ...res.data,
}; };
this.initMap();
}) })
.catch(() => {}); .catch(() => {});
}, },

35
src/views/modules/plugins/point/icpointvaccinesinoculation.vue

@ -75,6 +75,13 @@
>导入疫苗接种点数据</el-button >导入疫苗接种点数据</el-button
> >
</el-upload> </el-upload>
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
>发送通知</el-button
>
</div> </div>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
@ -197,12 +204,25 @@
@closeDialog="closeDialog" @closeDialog="closeDialog"
></add-or-update> ></add-or-update>
</el-dialog> </el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog :visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<icpoint-noice ref="ref_sendnotice"
@diaClose="diaClose"></icpoint-noice>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import mixinViewModule from "@/mixins/view-module"; import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointvaccinesinoculation-add-or-update"; import AddOrUpdate from "./icpointvaccinesinoculation-add-or-update";
import icpointNoice from './icpointNoice'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
@ -219,12 +239,25 @@ export default {
mobile: "", mobile: "",
}, },
updateId: null, updateId: null,
sendNoticeFormShow:false,
}; };
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
icpointNoice
}, },
methods: { methods: {
//
handleSendNotice () {
this.sendNoticeFormShow = true
this.$nextTick(() => {
this.$refs.ref_sendnotice.initForm(this.selectionAll, '4')
})
},
//
diaClose(){
this.sendNoticeFormShow = false
},
// / // /
addOrUpdateHandle(id) { addOrUpdateHandle(id) {
this.updateId = id; this.updateId = id;
@ -237,7 +270,7 @@ export default {
// //
closeDialog() { closeDialog() {
this.addOrUpdateVisible = false; this.addOrUpdateVisible = false;
this.uploadId = null; this.updateId = null;
}, },
handleExportModule() { handleExportModule() {
let title = "疫苗接种点模板"; let title = "疫苗接种点模板";

Loading…
Cancel
Save