Browse Source

fix:修改地址联动

master
123456 3 years ago
parent
commit
52756db412
  1. 172
      src/views/modules/plugins/point/icpointNoice.vue
  2. 11
      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

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

@ -1,17 +1,19 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form1"
:inline="true"
:model="formData"
:rules="dataRule"
class="form">
<el-form-item label="通知渠道"
prop="isSelChannel"
label-width="150px"
style="display: block">
<el-form
ref="ref_form1"
:inline="true"
:model="formData"
:rules="dataRule"
class="form"
>
<el-form-item
label="通知渠道"
prop="isSelChannel"
label-width="150px"
style="display: block"
>
<span>小程序通知</span>
<!-- <el-checkbox v-model="formData.isSelChannel"
key="0"
@ -25,46 +27,46 @@
</el-checkbox-group> -->
</el-form-item>
<el-form-item label="通知内容"
prop="content"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:autosize="{ minRows: 10, maxRows: 15 }"
clearable
placeholder="请输入通知内容"
v-model="formData.content"></el-input>
<el-form-item
label="通知内容"
prop="content"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:autosize="{ minRows: 10, maxRows: 15 }"
clearable
placeholder="请输入通知内容"
v-model="formData.content"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="form_div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
<el-button size="small" @click="handleCancle"> </el-button>
<el-button
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { Loading } from 'element-ui' // Loading
let loading //
let loading; //
export default {
data () {
data() {
return {
activeName: "second",
gridList: [],
@ -72,67 +74,105 @@ export default {
btnDisable: false,
formData: {
origin: '1',
origin: "1",
isSelChannel: false,
channel: [],
content: '',
content: "",
userList: [],
},
selectionAll: []
}
selectionAll: [],
};
},
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;
}
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({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
loading.close();
}
}
},
},
computed: {
dataRule () {
dataRule() {
return {
channel: [
{ required: true, message: '通知渠道不能为空', trigger: 'blur' }
{ required: true, message: "通知渠道不能为空", trigger: "blur" },
],
content: [
{ required: true, message: '通知内容不能为空', trigger: 'blur' }
]
}
{ required: true, message: "通知内容不能为空", trigger: "blur" },
],
};
},
},
props: {
// serviceList: {
// type: Array,
// default: []
// },
}
}
},
};
</script>

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

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

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

@ -100,6 +100,13 @@
>导入核酸监测点数据</el-button
>
</el-upload>
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
>发送通知</el-button
>
</div>
<el-table
v-loading="dataListLoading"
@ -193,12 +200,25 @@
@closeDialog="closeDialog"
></add-or-update>
</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>
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointnucleicmonitoring-add-or-update";
import icpointNoice from './icpointNoice'
export default {
mixins: [mixinViewModule],
@ -218,15 +238,28 @@ export default {
organizationList: [],
orgIds: [],
updateId: null,
sendNoticeFormShow:false,
};
},
components: {
AddOrUpdate,
icpointNoice
},
created() {
this.getFormInfo();
},
methods: {
//
handleSendNotice () {
this.sendNoticeFormShow = true
this.$nextTick(() => {
this.$refs.ref_sendnotice.initForm(this.selectionAll, '3')
})
},
//
diaClose(){
this.sendNoticeFormShow = false
},
// /
addOrUpdateHandle(id) {
this.updateId = id;
@ -239,7 +272,7 @@ export default {
//
closeDialog() {
this.addOrUpdateVisible = false;
this.uploadId = null;
this.updateId = null;
},
//
getFormInfo() {

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

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

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

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

Loading…
Cancel
Save