Browse Source

Merge branch 'dev-tuceng0616' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-tuceng0616

shibei_master
jiangyy 4 years ago
parent
commit
4f4a6b9032
  1. 4
      src/assets/scss/modules/management/list-main.scss
  2. 43
      src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue
  3. 444
      src/views/modules/communityService/sqzzz/cpts/edit.vue
  4. 557
      src/views/modules/cpts/base/cpts/edit.vue
  5. 213
      src/views/modules/cpts/base/index.vue
  6. 14
      src/views/modules/shequ/cpts/people-more.vue
  7. 37
      src/views/modules/shequzhili/csgltc/csgl.vue
  8. 52
      src/views/modules/shequzhili/csgltc/csglDetail.vue
  9. 38
      src/views/modules/shequzhili/csgltc/csglForm.vue
  10. 33
      src/views/modules/shequzhili/ggfwtc/ggfw.vue
  11. 23
      src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue
  12. 38
      src/views/modules/shequzhili/ggfwtc/ggfwForm.vue
  13. 149
      src/views/modules/shequzhili/tuceng/anquan/weihua/index.vue
  14. 536
      src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record.vue
  15. 234
      src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue
  16. 130
      src/views/modules/shequzhili/tuceng/yingji/ziyuan/index.vue
  17. 35
      src/views/modules/shequzhili/tuceng/zhonghe/anzhibangjiao.vue
  18. 777
      src/views/modules/shequzhili/tuceng/zhonghe/base.vue
  19. 35
      src/views/modules/shequzhili/tuceng/zhonghe/buliangqingshaonian.vue
  20. 35
      src/views/modules/shequzhili/tuceng/zhonghe/shequjiaozheng.vue
  21. 35
      src/views/modules/shequzhili/tuceng/zhonghe/xidurenyuanvue.vue
  22. 35
      src/views/modules/shequzhili/tuceng/zhonghe/xiejiaorenyuan.vue
  23. 83
      src/views/modules/shequzhili/tuceng/zhonghe/xinfang.vue
  24. 35
      src/views/modules/shequzhili/tuceng/zhonghe/zhaoshizhaohuojingshenbing.vue

4
src/assets/scss/modules/management/list-main.scss

@ -36,12 +36,12 @@
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px; border-radius: 4px;
margin-top: 15px; margin-top: 15px;
padding: 10px; padding: 10px 20px;
position: relative; position: relative;
.div_btn { .div_btn {
margin-top: 10px; margin-top: 10px;
margin-left: 10px; // margin-left: 10px;
display: flex; display: flex;
.btn_upload { .btn_upload {

43
src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue

@ -30,7 +30,7 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<div style="width:610px" v-else>{{ fmData.serviceTypeName }}</div> <div style="width: 610px" v-else>{{ fmData.serviceTypeName }}</div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -48,7 +48,7 @@
v-model="fmData.orgName" v-model="fmData.orgName"
> >
</el-input> </el-input>
<div style="width:610px" v-else>{{ fmData.orgName || "--" }}</div> <div style="width: 610px" v-else>{{ fmData.orgName || "--" }}</div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -67,7 +67,9 @@
placeholder="请输入服务内容,不超过1000字" placeholder="请输入服务内容,不超过1000字"
v-model="fmData.orgDescribe" v-model="fmData.orgDescribe"
></el-input> ></el-input>
<div style="width:610px" v-else>{{ fmData.orgDescribe || "--" }}</div> <div style="width: 610px" v-else>
{{ fmData.orgDescribe || "--" }}
</div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -84,7 +86,9 @@
placeholder="请输入负责人姓名" placeholder="请输入负责人姓名"
v-model="fmData.principalName" v-model="fmData.principalName"
></el-input> ></el-input>
<div style="width:610px" v-else>{{ fmData.principalName || "--" }}</div> <div style="width: 610px" v-else>
{{ fmData.principalName || "--" }}
</div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -101,7 +105,9 @@
placeholder="请输入联系方式" placeholder="请输入联系方式"
v-model="fmData.principalMobile" v-model="fmData.principalMobile"
></el-input> ></el-input>
<div style="width:610px" v-else>{{ fmData.principalMobile || "--" }}</div> <div style="width: 610px" v-else>
{{ fmData.principalMobile || "--" }}
</div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -165,7 +171,7 @@
placeholder="请输入备注,不超过500字" placeholder="请输入备注,不超过500字"
v-model="fmData.remark" v-model="fmData.remark"
></el-input> ></el-input>
<div style="width:610px" v-else>{{ fmData.remark || "--" }}</div> <div style="width: 610px" v-else>{{ fmData.remark || "--" }}</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -188,6 +194,7 @@
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper"; import formVltHelper from "dai-js/tools/formVltHelper";
import nextTick from "dai-js/tools/nextTick";
var map; var map;
var search; var search;
@ -288,8 +295,8 @@ export default {
geocoder = new TMap.service.Geocoder(); // geocoder = new TMap.service.Geocoder(); //
// //
map.on("panend", () => { map.on("panend", (e) => {
this.handleMoveCenter(); this.handleMoveCenter(e);
}); });
this.handleMoveCenter(); this.handleMoveCenter();
}, },
@ -336,7 +343,7 @@ export default {
}); });
}, },
handleMoveCenter() { handleMoveCenter(e) {
// //
const center = map.getCenter(); const center = map.getCenter();
const lat = center.getLat(); const lat = center.getLat();
@ -345,11 +352,13 @@ export default {
this.fmData.longitude = lng; this.fmData.longitude = lng;
this.setMarker(lat, lng); this.setMarker(lat, lng);
geocoder if (e && e.originalEvent) {
.getAddress({ location: new TMap.LatLng(lat, lng) }) // geocoder
.then((result) => { .getAddress({ location: new TMap.LatLng(lat, lng) }) //
this.fmData.address = result.result.address; .then((result) => {
}); this.fmData.address = result.result.address;
});
}
}, },
async getInfo() { async getInfo() {
@ -366,7 +375,11 @@ export default {
...data, ...data,
serviceTypeArr: data.serviceType.split(","), serviceTypeArr: data.serviceType.split(","),
}; };
map.setCenter(new TMap.LatLng(data.latitude, data.longitude));
await nextTick(800);
if (map) {
map.setCenter(new TMap.LatLng(data.latitude, data.longitude));
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

444
src/views/modules/communityService/sqzzz/cpts/edit.vue

@ -1,185 +1,246 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<el-form ref="ref_form" <el-form
:inline="true" ref="ref_form"
:model="dataForm" :inline="true"
:rules="dataRule" :model="dataForm"
:disabled="formType === 'detail'" :rules="dataRule"
class="form"> :disabled="formType === 'detail'"
<el-form-item label="组织名称 " class="form"
prop="organizationName" >
label-width="150px" <el-form-item
style="display: block"> label="组织名称 "
<el-input class="item_width_1" prop="organizationName"
maxlength="50" label-width="150px"
show-word-limit style="display: block"
placeholder="请输入组织名称 " >
v-model="dataForm.organizationName"> <el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入组织名称 "
v-model="dataForm.organizationName"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="分类名称 " <el-form-item
prop="categoryCode" label="分类名称 "
label-width="150px" prop="categoryCode"
style="display: block"> label-width="150px"
<el-select v-model="dataForm.categoryCode" style="display: block"
placeholder="请选择" >
clearable> <el-select
<el-option v-for="item in categoryList" v-model="dataForm.categoryCode"
:key="item.value" placeholder="请选择"
:label="item.label" clearable
:value="item.value"> >
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="组织人数 " <el-form-item
prop="organizationPersonCount" label="组织人数 "
label-width="150px" prop="organizationPersonCount"
style="display: block"> label-width="150px"
<el-input class="item_width_1" style="display: block"
type="number" >
maxlength="50" <el-input
show-word-limit class="item_width_1"
placeholder="请输入组织人数 " type="number"
v-model="dataForm.organizationPersonCount"> maxlength="50"
show-word-limit
placeholder="请输入组织人数 "
v-model="dataForm.organizationPersonCount"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="组织成员 " <el-form-item
prop="organizationPersonnel" label="组织成员 "
label-width="150px" prop="organizationPersonnel"
style="display: block"> label-width="150px"
style="display: block"
>
<div class="m-staffs"> <div class="m-staffs">
<div class="item" <div
:key="'staff' + index" class="item"
v-for="(item, index) in dataForm.organizationPersonnel"> :key="'staff' + index"
<el-input class="item_width_1" v-for="(item, index) in dataForm.organizationPersonnel"
maxlength="50" >
show-word-limit <el-autocomplete
placeholder="成员姓名" class="item_width_1"
v-model="item.personName" /> v-model="item.personName"
:fetch-suggestions="querySearchVolunteer"
<el-input style="margin-left: 10px" placeholder="成员姓名"
class="item_width_1" :maxlength="50"
maxlength="50" show-word-limit
show-word-limit @select="(vItem) => handleSelectVolunteer(index, vItem)"
placeholder="联系电话" :disabled="item.icResiUserId != ''"
v-model="item.personPhone" /> ></el-autocomplete>
<el-button style="margin-left: 10px" <el-input
size="small" style="margin-left: 10px"
@click="handleDelStaff(index)">删除</el-button> class="item_width_1"
show-word-limit
placeholder="联系电话"
:disabled="item.icResiUserId != ''"
v-model="item.personPhone"
/>
<el-button
style="margin-left: 10px"
size="small"
@click="handleDelStaff(index)"
>删除</el-button
>
</div> </div>
<div class="item-add"> <div class="item-add">
<el-button size="small" <el-button size="small" @click="handleAddStaff">添加</el-button>
@click="handleAddStaff">添加</el-button>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务事项" <el-form-item
prop="serviceItem" label="服务事项"
label-width="150px" prop="serviceItem"
style="display: block"> label-width="150px"
<el-input class="item_width_1" style="display: block"
type="textarea" >
maxlength="1000" <el-input
show-word-limit class="item_width_1"
:rows="3" type="textarea"
placeholder="请输入服务事项,不超过1000字" maxlength="1000"
v-model="dataForm.serviceItem"></el-input> show-word-limit
:rows="3"
placeholder="请输入服务事项,不超过1000字"
v-model="dataForm.serviceItem"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="负责人 " <el-form-item
prop="principalName" label="负责人 "
label-width="150px" prop="principalName"
style="display: block"> label-width="150px"
<el-input class="item_width_1" style="display: block"
maxlength="50" >
show-word-limit <el-input
placeholder="请输入负责人 " class="item_width_1"
v-model="dataForm.principalName"> maxlength="50"
show-word-limit
placeholder="请输入负责人 "
v-model="dataForm.principalName"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系电话 " <el-form-item
prop="principalPhone" label="联系电话 "
label-width="150px" prop="principalPhone"
style="display: block"> label-width="150px"
<el-input class="item_width_1" style="display: block"
maxlength="50" >
show-word-limit <el-input
placeholder="请输入联系电话 " class="item_width_1"
v-model="dataForm.principalPhone"> maxlength="50"
show-word-limit
placeholder="请输入联系电话 "
v-model="dataForm.principalPhone"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建时间" <el-form-item
prop="organizationCreatedTime" label="创建时间"
label-width="150px" prop="organizationCreatedTime"
style="display: block"> label-width="150px"
<el-date-picker v-model="dataForm.organizationCreatedTime" style="display: block"
placeholder="创建时间" >
value-format="yyyy-MM-dd"> <el-date-picker
v-model="dataForm.organizationCreatedTime"
placeholder="创建时间"
value-format="yyyy-MM-dd"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="位置坐标" <el-form-item
prop="longitude" label="位置坐标"
label-width="150px" prop="longitude"
style="display: block"> label-width="150px"
style="display: block"
>
<div style="width: 500px"> <div style="width: 500px">
<el-input class="item_width_4" <el-input
maxlength="50" class="item_width_4"
placeholder="请输入关键字" maxlength="50"
v-model="dataForm.address"> placeholder="请输入关键字"
v-model="dataForm.address"
>
</el-input> </el-input>
<el-button style="margin-left: 10px" <el-button
type="primary" style="margin-left: 10px"
size="small" type="primary"
@click="handleSearchMap">查询</el-button> size="small"
<div id="app" @click="handleSearchMap"
class="div_map"></div> >查询</el-button
>
<div id="app" class="div_map"></div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<span>经度</span> <span>经度</span>
<el-input class="item_width_3" <el-input
maxlength="50" class="item_width_3"
placeholder="请输入经度" maxlength="50"
v-model="dataForm.longitude"> placeholder="请输入经度"
v-model="dataForm.longitude"
>
</el-input> </el-input>
<span style="margin-left: 20px">纬度</span> <span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3" <el-input
maxlength="50" class="item_width_3"
placeholder="请输入纬度" maxlength="50"
v-model="dataForm.latitude"> placeholder="请输入纬度"
v-model="dataForm.latitude"
>
</el-input> </el-input>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注" <el-form-item
prop="remark" label="备注"
label-width="150px" prop="remark"
style="display: block"> label-width="150px"
<el-input class="item_width_1" style="display: block"
type="textarea" >
maxlength="500" <el-input
show-word-limit class="item_width_1"
:rows="3" type="textarea"
placeholder="请输入备注,不超过500字" maxlength="500"
v-model="dataForm.remark"></el-input> show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="div_btn resi-btns"> <div class="div_btn resi-btns">
<el-button size="small" <el-button size="small" @click="handleCancle"> </el-button>
@click="handleCancle"> </el-button> <el-button
<el-button v-if="formType != 'detail'" v-if="formType != 'detail'"
type="primary" type="primary"
size="small" size="small"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"
> </el-button
>
</div> </div>
</div> </div>
</template> </template>
@ -189,15 +250,19 @@ import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // Loading import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper"; import formVltHelper from "dai-js/tools/formVltHelper";
import nextTick from "dai-js/tools/nextTick";
var map; var map;
var search; var search;
var markers; var markers;
var infoWindowList; var infoWindowList;
let loading; // let loading; //
var geocoder; //
export default { export default {
data () { components: {},
props: {},
data() {
return { return {
formType: "add", // addeditdetail formType: "add", // addeditdetail
@ -219,11 +284,11 @@ export default {
organizationPersonnel: [], organizationPersonnel: [],
}, },
categoryList: [], categoryList: [],
volunteerList: [],
}; };
}, },
components: {},
computed: { computed: {
dataRule () { dataRule() {
return { return {
organizationName: [ organizationName: [
{ required: true, message: "组织名称 不能为空", trigger: "blur" }, { required: true, message: "组织名称 不能为空", trigger: "blur" },
@ -255,18 +320,53 @@ export default {
}; };
}, },
}, },
props: {},
watch: {}, watch: {},
async created () { async mounted() {
this.getCategoryList(); this.getCategoryList();
}, this.getVolunteerList();
async mounted () {
this.initMap(); this.initMap();
}, },
methods: { methods: {
async getCategoryList () { querySearchVolunteer(queryString, cb) {
const { volunteerList } = this;
var results = queryString
? volunteerList.filter((item) => {
return item.value.indexOf(queryString) !== -1;
})
: volunteerList;
// callback
cb(results);
},
handleSelectVolunteer(index, vItem) {
this.dataForm.organizationPersonnel[index] = {
personName: vItem.name,
personPhone: vItem.mobile,
icResiUserId: vItem.icResiUserId,
};
},
async getVolunteerList() {
const url = "/epmetuser/icresiuser/volunteer-list";
const params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.volunteerList = data.map((item) => {
return {
name: item.name,
value: item.label,
mobile: item.mobile,
icResiUserId: item.icResiUserId,
};
});
} else {
this.$message.error(msg);
}
},
async getCategoryList() {
const url = "/sys/dict/data/dictlist"; const url = "/sys/dict/data/dictlist";
const params = { const params = {
dictType: "self_org_category", dictType: "self_org_category",
@ -278,19 +378,19 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
handleAddStaff () { handleAddStaff() {
this.dataForm.organizationPersonnel = [ this.dataForm.organizationPersonnel = [
...this.dataForm.organizationPersonnel, ...this.dataForm.organizationPersonnel,
{ personName: "", personPhone: "" }, { personName: "", personPhone: "", icResiUserId: "" },
]; ];
}, },
handleDelStaff (index) { handleDelStaff(index) {
const { organizationPersonnel } = this.dataForm; const { organizationPersonnel } = this.dataForm;
organizationPersonnel.splice(index, 1); organizationPersonnel.splice(index, 1);
this.dataForm.organizationPersonnel = organizationPersonnel; this.dataForm.organizationPersonnel = organizationPersonnel;
}, },
// init // init
initMap () { initMap() {
// //
var center = new window.TMap.LatLng(36.0722275, 120.38945519); var center = new window.TMap.LatLng(36.0722275, 120.38945519);
// map TMap.Map() // map TMap.Map()
@ -309,14 +409,16 @@ export default {
}); });
infoWindowList = Array(10); infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); //
// //
map.on("panend", () => { map.on("panend", (e) => {
this.handleMoveCenter(); this.handleMoveCenter(e);
}); });
this.handleMoveCenter(); this.handleMoveCenter();
}, },
setMarker (lat, lng) { setMarker(lat, lng) {
markers.setGeometries([]); markers.setGeometries([]);
markers.add([ markers.add([
{ {
@ -330,7 +432,7 @@ export default {
]); ]);
}, },
handleSearchMap () { handleSearchMap() {
infoWindowList.forEach((infoWindow) => { infoWindowList.forEach((infoWindow) => {
infoWindow.close(); infoWindow.close();
}); });
@ -358,7 +460,8 @@ export default {
}); });
}, },
handleMoveCenter () { handleMoveCenter(e) {
console.log(e);
// //
const center = map.getCenter(); const center = map.getCenter();
const lat = center.getLat(); const lat = center.getLat();
@ -366,9 +469,17 @@ export default {
this.dataForm.latitude = lat; this.dataForm.latitude = lat;
this.dataForm.longitude = lng; this.dataForm.longitude = lng;
this.setMarker(lat, lng); this.setMarker(lat, lng);
if (e && e.originalEvent) {
geocoder
.getAddress({ location: new TMap.LatLng(lat, lng) }) //
.then((result) => {
this.dataForm.address = result.result.address;
});
}
}, },
async initForm (type, row) { async initForm(type, row) {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.formType = type; this.formType = type;
@ -376,11 +487,15 @@ export default {
if (row) { if (row) {
this.dataForm = { ...this.dataForm, ...row }; this.dataForm = { ...this.dataForm, ...row };
this.orgId = this.dataForm.orgId; this.orgId = this.dataForm.orgId;
map.setCenter(new TMap.LatLng(row.latitude, row.longitude));
await nextTick(800);
if (map) {
map.setCenter(new TMap.LatLng(row.latitude, row.longitude));
}
} }
}, },
async handleComfirm () { async handleComfirm() {
this.btnDisable = true; this.btnDisable = true;
setTimeout(() => { setTimeout(() => {
this.btnDisable = false; this.btnDisable = false;
@ -400,10 +515,7 @@ export default {
dataForm: { organizationPersonnel }, dataForm: { organizationPersonnel },
} = this; } = this;
let vlt = organizationPersonnel.every((item) => { let vlt = organizationPersonnel.every((item) => {
return ( return item.personName && item.personPhone;
item.personName &&
item.personPhone
);
}); });
if (!vlt) { if (!vlt) {
return this.$message({ return this.$message({
@ -416,7 +528,7 @@ export default {
}); });
}, },
async submit () { async submit() {
let url = ""; let url = "";
if (this.formType === "add") { if (this.formType === "add") {
url = "/heart/iccommunityselforganization/addcommunityselforganization"; url = "/heart/iccommunityselforganization/addcommunityselforganization";
@ -444,11 +556,11 @@ export default {
} }
}, },
handleCancle () { handleCancle() {
this.resetData(); this.resetData();
this.$emit("dialogCancle"); this.$emit("dialogCancle");
}, },
resetData () { resetData() {
this.orgId = ""; this.orgId = "";
this.dataForm = { this.dataForm = {
organizationName: "", organizationName: "",
@ -466,7 +578,7 @@ export default {
}; };
}, },
// //
startLoading () { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -474,7 +586,7 @@ export default {
}); });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();

557
src/views/modules/cpts/base/cpts/edit.vue

@ -2,122 +2,270 @@
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<el-form <el-form
v-if="iniLoaded"
ref="ref_form" ref="ref_form"
:model="fmData" :model="fmData"
:inline="true" :inline="true"
:disabled="formType === 'watch'" :disabled="formType === 'watch'"
class="form" class="m-fm"
:class="editParamsDiv ? 'z-div' : ''"
> >
<el-form-item <div class="list">
v-for="item in editParams" <el-form-item
label-width="150px" v-for="item in editParams1"
style="display: block" label-width="150px"
:key="'edit' + item.keyName" style="display: block"
:label="item.field" :key="'edit' + item.keyName"
:prop="item.keyName" :label="item.field"
:rules="item.rules || []" :prop="item.keyName"
> :rules="item.rules || []"
<template v-if="item.type == 'input'"> >
<el-input <template v-if="item.type == 'input'">
v-if=" <el-input
formType == 'add' || (formType == 'edit' && !item.editDisable) v-if="
" formType == 'add' || (formType == 'edit' && !item.editDisable)
v-model="fmData[item.keyName]" "
class="item_width_1" v-model="fmData[item.keyName]"
size="small" class="item-input"
clearable size="small"
show-word-limit clearable
:maxlength="item.maxlength || ''" show-word-limit
:placeholder="item.placeholder || '请输入'" :maxlength="item.maxlength || ''"
> :placeholder="item.placeholder || '请输入'"
</el-input>
<div style="width: 610px" v-else>
{{ item.value || "--" }}
</div>
</template>
<template v-if="item.type == 'textarea'">
<el-input
v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
type="textarea"
class="item_width_1"
size="small"
clearable
show-word-limit
:rows="3"
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'"
>
</el-input>
<div style="width: 610px" v-else>
{{ item.value || "--" }}
</div>
</template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
class="item_width_2"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
> >
</el-option> </el-input>
</el-select>
</template> <div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</template>
<template v-else-if="item.type == 'address'"> <template v-if="item.type == 'textarea'">
<div style="width: 500px">
<el-input <el-input
class="item_width_4" v-if="
maxlength="100" formType == 'add' || (formType == 'edit' && !item.editDisable)
style="width: 430px" "
show-word-limit
:placeholder="item.placeholder || '请输入所在地址'"
v-model="fmData[item.keyName]" v-model="fmData[item.keyName]"
type="textarea"
class="item-input"
size="small"
clearable
show-word-limit
:rows="3"
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'"
> >
</el-input> </el-input>
<el-button
style="margin-left: 10px" <div class="item-show" v-else>
type="default" {{ fmData[item.keyName] || "--" }}
</div>
</template>
<template v-if="item.type == 'number'">
<el-input-number
v-model="fmData[item.keyName]"
class="item-number"
size="small" size="small"
@click="handleSearchMap(item)" clearable
>查询</el-button show-word-limit
:rows="3"
:min="item.min || 0"
:max="item.max || 999999999999"
:placeholder="item.placeholder || '请输入'"
> >
<div id="app" class="div_map"></div> </el-input-number>
<div style="margin-top: 10px"> <span v-if="item.unitName">{{ item.unitName }}</span>
<span>经度</span> </template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
class="item-select"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
>
</el-option>
</el-select>
</template>
<template v-else-if="item.type == 'address'">
<div class="address-item">
<el-input <el-input
class="item_width_3" class="address-item-input"
maxlength="50" maxlength="100"
placeholder="请输入经度" show-word-limit
v-model="fmData[item.supKeys[0]]" :placeholder="item.placeholder || '请输入所在地址'"
v-model="fmData[item.keyName]"
> >
</el-input> </el-input>
<span style="margin-left: 20px">纬度</span> <el-button
style="margin-left: 10px"
type="default"
size="small"
@click="handleSearchMap(item)"
>查询</el-button
>
<div id="app" class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入经度"
v-model="fmData[item.supKeys[0]]"
>
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入纬度"
v-model="fmData[item.supKeys[1]]"
>
</el-input>
</div>
</div>
</template>
</el-form-item>
</div>
<div class="list" v-if="editParams2.length > 0">
<el-form-item
v-for="item in editParams2"
label-width="150px"
style="display: block"
:key="'edit' + item.keyName"
:label="item.field"
:prop="item.keyName"
:rules="item.rules || []"
>
<template v-if="item.type == 'input'">
<el-input
v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
class="item-input"
size="small"
clearable
show-word-limit
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'"
>
</el-input>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</template>
<template v-if="item.type == 'textarea'">
<el-input
v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
type="textarea"
class="item-input"
size="small"
clearable
show-word-limit
:rows="3"
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'"
>
</el-input>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</template>
<template v-if="item.type == 'number'">
<el-input-number
v-model="fmData[item.keyName]"
class="item-number"
size="small"
clearable
show-word-limit
:rows="3"
:min="item.min || 0"
:max="item.max || 999999999999"
:placeholder="item.placeholder || '请输入'"
>
</el-input-number>
<span v-if="item.unitName">{{ item.unitName }}</span>
</template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
class="item-select"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
>
</el-option>
</el-select>
</template>
<template v-else-if="item.type == 'address'">
<div class="address-item">
<el-input <el-input
class="item_width_3" class="address-item-input"
maxlength="50" maxlength="100"
placeholder="请输入纬度" show-word-limit
v-model="fmData[item.supKeys[1]]" :placeholder="item.placeholder || '请输入所在地址'"
v-model="fmData[item.keyName]"
> >
</el-input> </el-input>
<el-button
style="margin-left: 10px"
type="default"
size="small"
@click="handleSearchMap(item)"
>查询</el-button
>
<div id="app" class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入经度"
v-model="fmData[item.supKeys[0]]"
>
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入纬度"
v-model="fmData[item.supKeys[1]]"
>
</el-input>
</div>
</div> </div>
</div> </template>
</template> </el-form-item>
</el-form-item> </div>
</el-form> </el-form>
<slot v-bind:id="formId" v-bind:info="fmData" v-bind:formType="formType"></slot>
</div> </div>
<div class="div_btn resi-btns"> <div class="div_btn resi-btns">
@ -155,17 +303,53 @@ export default {
type: String, type: String,
default: "info", default: "info",
}, },
idName: {
type: String,
default: "",
},
addUrl: {
type: String,
default: "",
},
editUrl: {
type: String,
default: "",
},
delUrl: {
type: String,
default: "",
},
infoUrl: {
type: String,
default: "",
},
editParams: { editParams: {
type: Array, type: Array,
default: () => [], default: () => [],
}, },
editFixedParams: {
type: Object,
default: () => {
return {};
},
},
editParamsDiv: {
type: Number,
default: 0,
},
}, },
data() { data() {
return { return {
iniLoaded: false,
btnDisable: false, btnDisable: false,
fmData: {}, fmData: {},
editParams1: [],
editParams2: [],
}; };
}, },
components: {}, components: {},
@ -192,10 +376,20 @@ export default {
} }
}, },
computeFmData() {
console.log(this.fmData);
},
iniFmData() { iniFmData() {
const { editParams } = this; const { editParams, fmData, editParamsDiv } = this;
editParams.forEach(async (item, index) => { editParams.forEach((item, index) => {
this.fmData[item.keyName] = item.value; fmData[item.keyName] = item.value || "";
if (item.supValues) {
item.supValues.forEach((value, index) => {
fmData[item.supKeys[index]] = value;
});
}
if (item.type == "select") { if (item.type == "select") {
if (item.optionUrl) { if (item.optionUrl) {
this.getFmOptions( this.getFmOptions(
@ -205,10 +399,22 @@ export default {
); );
} }
} else if (item.type == "address") { } else if (item.type == "address") {
await nextTick(500); this.$nextTick(async () => {
this.initMap(item); await nextTick(300);
this.initMap(item);
});
} }
}); });
this.fmData = { ...fmData };
if (editParamsDiv) {
this.editParams1 = editParams.slice(0, editParamsDiv);
this.editParams2 = editParams.slice(editParamsDiv);
} else {
this.editParams1 = editParams;
}
console.log("------------------------------------", this.fmData);
this.iniLoaded = true;
}, },
async getFmOptions(index, url, params) { async getFmOptions(index, url, params) {
@ -246,8 +452,8 @@ export default {
geocoder = new TMap.service.Geocoder(); // geocoder = new TMap.service.Geocoder(); //
// //
map.on("panend", () => { map.on("panend", (e) => {
this.handleMoveCenter(item); this.handleMoveCenter(item, e);
}); });
this.handleMoveCenter(item); this.handleMoveCenter(item);
}, },
@ -286,35 +492,48 @@ export default {
} = data[0]; } = data[0];
map.setCenter(new TMap.LatLng(lat, lng)); map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng); this.setMarker(lat, lng);
item.supValues[0] = lng; // item.supValues[0] = lng;
item.supValues[1] = lat; // item.supValues[1] = lat;
this.fmData[item.supKeys[0]] = lng;
this.fmData[item.supKeys[1]] = lat;
} else { } else {
this.$message.error("未检索到相关位置坐标"); this.$message.error("未检索到相关位置坐标");
} }
}); });
}, },
handleMoveCenter(item) { handleMoveCenter(item, e) {
console.log(e);
// //
const center = map.getCenter(); const center = map.getCenter();
const lat = center.getLat(); const lat = center.getLat();
const lng = center.getLng(); const lng = center.getLng();
item.supValues[0] = lng; // item.supValues[0] = lng;
item.supValues[1] = lat; // item.supValues[1] = lat;
this.fmData[item.supKeys[0]] = lng;
this.fmData[item.supKeys[1]] = lat;
this.setMarker(lat, lng); this.setMarker(lat, lng);
geocoder if (e && e.originalEvent) {
.getAddress({ location: new TMap.LatLng(lat, lng) }) // geocoder
.then((result) => { .getAddress({ location: new TMap.LatLng(lat, lng) }) //
item.value = result.result.address; .then((result) => {
}); this.fmData[item.keyName] = result.result.address;
});
}
}, },
async getInfo() { async getInfo() {
const url = "/heart/icServiceOrg/detail"; let url = this.infoUrl;
if (!url) return;
const { idName, formId } = this;
if (url.endsWith("/")) {
url += formId;
}
const params = { const params = {
icServiceOrgId: this.formId, [idName]: formId,
}; };
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
@ -322,9 +541,13 @@ export default {
this.fmData = { this.fmData = {
...this.fmData, ...this.fmData,
...data, ...data,
serviceTypeArr: data.serviceType.split(","),
}; };
map.setCenter(new TMap.LatLng(data.latitude, data.longitude)); console.log("------------------------------------info", this.fmData);
await nextTick(800);
if (map) {
map.setCenter(new TMap.LatLng(data.latitude, data.longitude));
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -339,7 +562,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.btnDisable = false; this.btnDisable = false;
}, 5000); }, 5000);
this.computeFmData();
this.$refs["ref_form"].validate((valid, messageObj) => { this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) { if (!valid) {
app.util.validateRule(messageObj); app.util.validateRule(messageObj);
@ -350,25 +573,11 @@ export default {
}); });
}, },
computeFmData() {
console.log("11111111111111111112", this.fmData);
// let fmData = {};
// this.editParams.forEach((item) => {
// fmData[item.keyName] = item.value;
// if (item.supValues) {
// item.supValues.forEach((value, index) => {
// fmData[item.supKeys[index]] = value;
// });
// }
// });
// this.fmData = fmData;
return this.fmData;
},
async submit() { async submit() {
let url = ""; let url = "";
let params = { let params = {
...this.computeFmData(), ...this.fmData,
...this.editFixedParams,
// serviceType: this.fmData.serviceTypeArr.join(","), // serviceType: this.fmData.serviceTypeArr.join(","),
}; };
@ -376,8 +585,6 @@ export default {
url = this.addUrl; url = this.addUrl;
} else { } else {
url = this.editUrl; url = this.editUrl;
// params.icServiceOrgId = this.formId;
} }
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
@ -403,39 +610,57 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.item_width_1 { .m-fm {
width: 500px; margin-top: 30px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map { &.z-div {
margin-top: 10px; display: flex;
}
.div_btn { .item-input {
// display: flex; width: 225px;
// justify-content: flex-end; }
} .item-select {
.el-tabs { width: 225px;
margin: 0 20px; }
} .item-number {
.el-upload__tip { width: 125px;
color: rgb(155, 155, 155); }
margin: 0;
}
.form {
margin-top: 30px;
}
.attachement-list { .address-item {
width: 450px;
.address-item-input {
width: 85%;
}
.address-item-input2 {
margin-left: 5px;
width: 40%;
}
}
}
.item-input {
width: 450px;
}
.item-select {
width: 225px;
}
.item-number {
width: 125px;
}
.address-item {
width: 450px;
.address-item-input {
width: 85%;
}
.address-item-input2 {
margin-left: 5px;
width: 40%;
}
}
.div_map {
margin-top: 10px;
}
} }
</style> </style>

213
src/views/modules/cpts/base/index.vue

@ -2,7 +2,7 @@
<div class="div_main"> <div class="div_main">
<div v-show="true"> <div v-show="true">
<div class="div_search"> <div class="div_search">
<el-form :inline="true" ref="ref_searchform" :label-width="'80px'"> <el-form :inline="true" ref="ref_searchform" label-width="100px">
<div> <div>
<el-form-item <el-form-item
v-for="item in searchParams" v-for="item in searchParams"
@ -30,7 +30,7 @@
> >
<el-option <el-option
v-for="item in item.optionList" v-for="item in item.optionList"
:key="item.value" :key="'serach' + item.keyName + item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
@ -40,14 +40,14 @@
</el-form-item> </el-form-item>
<el-button <el-button
style="margin-left: 30px" style="margin-left: 30px; margin-bottom: 20px"
size="small" size="small"
class="diy-button--search" class="diy-button--search"
@click="handleSearch" @click="handleSearch"
>查询</el-button >查询</el-button
> >
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px; margin-bottom: 20px"
size="small" size="small"
class="diy-button--reset" class="diy-button--reset"
@click="resetSearch" @click="resetSearch"
@ -67,12 +67,39 @@
>新增</el-button >新增</el-button
> >
<!-- <el-button <el-button
v-if="mubanUrl"
class="btn_upload diy-button--export"
size="small"
@click="handleExportModule('room')"
>下载模板</el-button
>
<el-upload
v-if="importUrl"
ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button size="small" class="btn_upload diy-button--delete"
>导入</el-button
>
</el-upload>
<el-button
v-if="exportUrl"
@click="handleExport" @click="handleExport"
class="diy-button--reset" class="btn_upload diy-button--reset"
size="small" size="small"
>导出</el-button >导出</el-button
> --> >
</div> </div>
<el-table <el-table
@ -86,7 +113,7 @@
<template v-for="item in tableParams" :prop="item.keyName"> <template v-for="item in tableParams" :prop="item.keyName">
<el-table-column <el-table-column
v-if="item.type == 'no'" v-if="item.type == 'no'"
:key="'table' + item.keyName" :key="'table-no' + item.keyName"
:label="item.field" :label="item.field"
fixed="left" fixed="left"
type="index" type="index"
@ -95,8 +122,8 @@
/> />
<el-table-column <el-table-column
:key="'table' + item.keyName"
v-else-if="item.type == 'text'" v-else-if="item.type == 'text'"
:key="'table' + item.keyName"
:prop="item.keyName" :prop="item.keyName"
:label="item.field" :label="item.field"
align="center" align="center"
@ -121,15 +148,15 @@
>查看</el-button >查看</el-button
> >
<el-button <el-button
v-if="editUrl" v-if="editUrl && editAuth(scope.row)"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
type="text" type="text"
size="small" size="small"
class="div-table-button--edit" class="div-table-button--edit"
>编辑</el-button >{{ editBtnName(scope.row) }}</el-button
> >
<el-popconfirm <el-popconfirm
v-if="delUrl" v-if="delUrl && delAuth(scope.row)"
title="删除之后无法回复,确认删除?" title="删除之后无法回复,确认删除?"
@onConfirm="handleDelete(scope.row, scope.$index)" @onConfirm="handleDelete(scope.row, scope.$index)"
@confirm="handleDelete(scope.row, scope.$index)" @confirm="handleDelete(scope.row, scope.$index)"
@ -169,19 +196,34 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="formTitle" :title="formTitle"
width="850px" :width="editParamsDiv ? '1100px' : '850px'"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="handleClose" @closed="handleClose"
> >
<edit-form <edit-form
ref="eleEditForm" ref="eleEditForm"
:idName="idName"
:formId="formId" :formId="formId"
:formType="formType" :formType="formType"
:infoUrl="infoUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:editParams="editParams" :editParams="editParams"
:editParamsDiv="editParamsDiv"
:editFixedParams="editFixedParams"
@close="handleClose" @close="handleClose"
@afterEdit="handleEditSuccess" @afterEdit="handleEditSuccess"
></edit-form> >
<template v-slot="{ id, formType, info }">
<slot
name="editElse"
v-bind:id="id"
v-bind:formType="formType"
v-bind:info="info"
></slot>
</template>
</edit-form>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -227,15 +269,55 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
infoUrl: {
type: String,
default: "",
},
exportUrl: { exportUrl: {
type: String, type: String,
default: "", default: "",
}, },
importUrl: {
type: String,
default: "",
},
mubanUrl: {
type: String,
default: "",
},
editAuth: {
type: Function,
default: () => true,
},
editBtnName: {
type: Function,
default: () => "编辑",
},
delAuth: {
type: Function,
default: () => true,
},
editParams: { editParams: {
type: Array, type: Array,
default: () => [], default: () => [],
}, },
editFixedParams: {
type: Object,
default: () => {
return {};
},
},
editParamsDiv: {
type: Number,
default: 0,
},
idName: {
type: String,
default: "id",
},
}, },
data() { data() {
@ -308,6 +390,89 @@ export default {
this.getTableData(); this.getTableData();
}, },
beforeExcelUpload(file) {
console.log("file", file);
const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error("上传文件只能是xls/xlsx格式!");
}
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return fileType && isLt1M;
},
async uploadHttpRequest(file) {
let { importUrl: url } = this;
if (!url) return;
this.$message({
showClose: true,
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append("file", file.file); //
await this.$http
.post(url, formData)
.then((res) => {
console.log("res-up", res);
if (res.data.code == 0 && res.data.msg == "success") {
// this.$message.success('')
this.getTableData();
this.$refs.upload.clearFiles();
} else this.$message.error(res.data.msg);
})
.catch((err) => {
console.log("失败", err);
file.onError(); //
// this.$message.error('')
});
},
async handleExportModule() {
let { mubanUrl: url } = this;
if (!url) return;
await this.$http({
method: "POST",
url,
responseType: "blob",
data: {},
})
.then((res) => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
async handleExport() { async handleExport() {
const { exportUrl: url } = this; const { exportUrl: url } = this;
if (!url) return; if (!url) return;
@ -353,16 +518,18 @@ export default {
}, },
handleWatch(row) { handleWatch(row) {
const { idName } = this;
this.formType = "watch"; this.formType = "watch";
this.formId = row.icServiceOrgId; this.formId = row[idName];
this.formTitle = "查看"; this.formTitle = "查看";
this.formShow = true; this.formShow = true;
}, },
handleEdit(row) { handleEdit(row) {
const { idName } = this;
this.formType = "edit"; this.formType = "edit";
this.formId = row.icServiceOrgId; this.formId = row[idName];
this.formTitle = "编辑"; this.formTitle = "修改";
this.formShow = true; this.formShow = true;
}, },
@ -377,13 +544,17 @@ export default {
async handleDelete(rowData, rowIndex) { async handleDelete(rowData, rowIndex) {
console.log(rowData, rowIndex); console.log(rowData, rowIndex);
const { delUrl: url } = this; let { delUrl: url } = this;
if (!url) return; if (!url) return;
const { tableData } = this; const { tableData, idName } = this;
const idValue = tableData[rowIndex][idName];
if (url.endsWith("/")) {
url += idValue;
}
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, {
icServiceOrgId: tableData[rowIndex].icServiceOrgId, [idName]: idValue,
}); });
if (code === 0) { if (code === 0) {
@ -447,5 +618,5 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss"; @import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss"; @import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss"; // @import "@/assets/scss/modules/shequzhili/event-info.scss";
</style> </style>

14
src/views/modules/shequ/cpts/people-more.vue

@ -252,6 +252,7 @@
style="margin-top: 10px; padding: 0 20px" style="margin-top: 10px; padding: 0 20px"
> >
<el-table <el-table
v-if="vaccineList"
class="table" class="table"
:data="vaccineList" :data="vaccineList"
border border
@ -368,6 +369,8 @@ export default {
homeList: [], homeList: [],
natList: [], // natList: [], //
tripList: [], // tripList: [], //
vaccineList: [],
}; };
}, },
@ -502,18 +505,19 @@ export default {
return "--"; return "--";
}, },
getNodePath(node, val, path) { // node:val:id, path:id getNodePath(node, val, path) {
// node:val:id, path:id
for (let i = 0; i < node.length; i++) { for (let i = 0; i < node.length; i++) {
const ele = node[i]; const ele = node[i];
if (ele.value === val) { if (ele.value === val) {
path.push(ele.label); path.push(ele.label);
return path return path;
} else if (ele.children && ele.children.length > 0) { } else if (ele.children && ele.children.length > 0) {
if (ele.children.some(row => row.value === val)) { if (ele.children.some((row) => row.value === val)) {
path.unshift(ele.label); path.unshift(ele.label);
this.getNodePath(ele.children,val,path); this.getNodePath(ele.children, val, path);
} else { } else {
this.getNodePath(ele.children,val,path); this.getNodePath(ele.children, val, path);
} }
} }
} }

37
src/views/modules/shequzhili/csgltc/csgl.vue

@ -24,16 +24,16 @@
size="small" size="small"
clearable> clearable>
<el-option v-for="item in serviceList" <el-option v-for="item in serviceList"
:key="item.categoryKey" :key="item.value"
:label="item.categoryName" :label="item.label"
:value="item.categoryKey"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
class="diy-button--delete" class="diy-button--search"
size="small" size="small"
@click="handleSearch">查询</el-button> @click="handleSearch">查询</el-button>
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
@ -45,10 +45,10 @@
</div> </div>
<div class="div_table"> <div class="div_table">
<div class="div_btn"> <div class="div_btn">
<el-button class="diy-button--delete" <el-button class="diy-button--add"
size="small" size="small"
@click="handleAdd">新增</el-button> @click="handleAdd">新增</el-button>
<el-button class="diy-button--delete" <el-button class="diy-button--search"
style="margin-left:10px" style="margin-left:10px"
size="small" size="small"
@click="handleExportModule('room')">下载模板</el-button> @click="handleExportModule('room')">下载模板</el-button>
@ -67,7 +67,7 @@
</el-upload> </el-upload>
<el-button style="float:left;margin-left:10px" <el-button style="float:left;margin-left:10px"
class="diy-button--delete" class="diy-button--reset"
size="small" size="small"
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
@ -115,6 +115,7 @@
<el-table-column prop="address" <el-table-column prop="address"
header-align="center" header-align="center"
align="center" align="center"
show-overflow-tooltip
label="地址" label="地址"
width="120"> width="120">
</el-table-column> </el-table-column>
@ -131,12 +132,24 @@
class="div-table-button--detail" class="div-table-button--detail"
size="small" size="small"
@click="handleDetail(scope.row)">查看</el-button> @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" <el-button v-if="scope.row.agencyId === agencyId && (scope.row.longitude === '' || scope.row.longitude === null || scope.row.latitude === '' || scope.row.latitude === null) && scope.row.sourceType === 'import'"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">待完善</el-button>
<el-button v-else-if="scope.row.agencyId === agencyId && (scope.row.longitude !== '' && scope.row.longitude !== null && scope.row.latitude !== '' && scope.row.latitude !== null) && scope.row.sourceType === 'import'"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-else-if="scope.row.agencyId === agencyId && scope.row.sourceType === 'add'"
type="text"
class="div-table-button--edit" class="div-table-button--edit"
size="small" size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
<el-button type="text" <el-button v-if="scope.row.agencyId === agencyId"
type="text"
class="div-table-button--delete" class="div-table-button--delete"
size="small" size="small"
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
@ -202,7 +215,7 @@ export default {
return { return {
loading: false, loading: false,
total: 0, total: 0,
pageSize: 10, pageSize: 20,
pageNo: 0, pageNo: 0,
tableLoading: false, tableLoading: false,
agencyId: '', agencyId: '',
@ -428,8 +441,8 @@ export default {
async handleExport () { async handleExport () {
let title = '城市管理图层' let title = '城市管理图层'
// const url = "/gov/org/icCityManagement/export" const url = "/gov/org/icCityManagement/export"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icCityManagement/export" // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icCityManagement/export"
let params = { let params = {
...this.formData ...this.formData
} }

52
src/views/modules/shequzhili/csgltc/csglDetail.vue

@ -22,15 +22,6 @@
<span class="detail_span">{{formData.categoryName}}</span> <span class="detail_span">{{formData.categoryName}}</span>
</el-form-item> </el-form-item>
<!--<el-form-item label="服务事项:"
prop="serviceMatterList"
label-width="150px"
style="display: block">
<p class="detail_span"
v-for="(item,index) in formData.serviceMatterList"
:key="index">{{item}}</p>
</el-form-item>-->
<el-form-item label="占地面积:" <el-form-item label="占地面积:"
prop="areaCovered" prop="areaCovered"
label-width="150px" label-width="150px"
@ -50,32 +41,29 @@
label-width="150px"> label-width="150px">
<span class="detail_span">{{formData.address}}</span> <span class="detail_span">{{formData.address}}</span>
</el-form-item> </el-form-item>
<!--<el-form-item label="备注:" <el-form-item label="位置坐标"
prop="remark"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.remark?formData.remark:'无'}}</span>
</el-form-item>
<el-form-item label="地理位置:"
prop="address"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.address}}</span>
</el-form-item>
<el-form-item label="位置坐标:"
prop="longitude" prop="longitude"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<div style="width:500px"> <div style="width: 500px">
<div id="app"
<div id="app"> class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="formData.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="formData.latitude">
</el-input>
</div> </div>
</div> </div>
</el-form-item>--> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -106,8 +94,8 @@ export default {
} }
}, },
components: {}, components: {},
mounted () { async mounted () {
this.initMap() await this.initMap()
}, },
methods: { methods: {

38
src/views/modules/shequzhili/csgltc/csglForm.vue

@ -48,9 +48,9 @@
filterable filterable
clearable> clearable>
<el-option v-for="item in serviceList" <el-option v-for="item in serviceList"
:key="item.categoryKey" :key="item.value"
:label="item.categoryName" :label="item.label"
:value="item.categoryKey"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -186,7 +186,7 @@ export default {
methods: { methods: {
async initForm (type, unitId) { async initForm (type, icCityManagementId) {
this.startLoading() this.startLoading()
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
@ -194,9 +194,9 @@ export default {
await this.loadService() await this.loadService()
this.formType = type this.formType = type
if (unitId) { if (icCityManagementId) {
this.unitId = unitId this.icCityManagementId = icCityManagementId
this.formData.id = unitId this.formData.icCityManagementId = icCityManagementId
await this.loadFormData() await this.loadFormData()
} else { } else {
map.setCenter(new TMap.LatLng(36.0722275, 120.38945519)) map.setCenter(new TMap.LatLng(36.0722275, 120.38945519))
@ -268,24 +268,13 @@ export default {
}, },
async addUnit () { async addUnit () {
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; // let url = ''
// if (regPhone.test(this.formData.contactMobile) === false) { if (this.formType === 'add'){
// this.btnDisable = false url = '/gov/org/icCityManagement/add'
// this.$message({ }else {
// type: 'warning', url = '/gov/org/icCityManagement/edit'
// message: '' }
// })
// return false;
// }
let url = '/gov/org/icCityManagement/add'
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/icCityManagement/add"
// if (this.formType === 'edit') {
// this.formData.id = this.unitId
// }
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -298,7 +287,6 @@ export default {
this.btnDisable = false this.btnDisable = false
this.$message.error(msg) this.$message.error(msg)
} }
}, },
handleCancle () { handleCancle () {

33
src/views/modules/shequzhili/ggfwtc/ggfw.vue

@ -25,14 +25,14 @@
size="small" size="small"
clearable> clearable>
<el-option v-for="item in serviceList" <el-option v-for="item in serviceList"
:key="item.categoryKey" :key="item.value"
:label="item.categoryName" :label="item.label"
:value="item.categoryKey"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
class="diy-button--delete" class="diy-button--search"
size="small" size="small"
@click="handleSearch">查询</el-button> @click="handleSearch">查询</el-button>
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
@ -44,11 +44,11 @@
</div> </div>
<div class="div_table"> <div class="div_table">
<div class="div_btn"> <div class="div_btn">
<el-button class="diy-button--delete" <el-button class="diy-button--add"
size="small" size="small"
@click="handleAdd">新增</el-button> @click="handleAdd">新增</el-button>
<el-button class="diy-button--delete" <el-button class="diy-button--search"
style="margin-left:10px" style="margin-left:10px"
size="small" size="small"
@click="handleExportModule('room')">下载模板</el-button> @click="handleExportModule('room')">下载模板</el-button>
@ -66,7 +66,7 @@
size="small">导入</el-button> size="small">导入</el-button>
</el-upload> </el-upload>
<el-button style="float:left;margin-left:10px" <el-button style="float:left;margin-left:10px"
class="diy-button--delete" class="diy-button--reset"
size="small" size="small"
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
</div> </div>
@ -112,6 +112,7 @@
<el-table-column prop="address" <el-table-column prop="address"
header-align="center" header-align="center"
align="center" align="center"
show-overflow-tooltip
label="地址" label="地址"
width="120"> width="120">
</el-table-column> </el-table-column>
@ -127,11 +128,23 @@
class="div-table-button--detail" class="div-table-button--detail"
size="small" size="small"
@click="handleDetail(scope.row)">查看</el-button> @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" <el-button v-if="scope.row.agencyId === agencyId && (scope.row.longitude === '' || scope.row.longitude === null || scope.row.latitude === '' || scope.row.latitude === null) && scope.row.sourceType === 'import'"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">待完善</el-button>
<el-button v-else-if="scope.row.agencyId === agencyId && scope.row.longitude !== '' && scope.row.longitude !== null && scope.row.latitude !== '' && scope.row.latitude !== null && scope.row.sourceType === 'import'"
type="text"
class="div-table-button--edit" class="div-table-button--edit"
size="small" size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
<el-button type="text" <el-button v-else-if="scope.row.agencyId === agencyId && scope.row.sourceType === 'add'"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.agencyId === agencyId"
type="text"
class="div-table-button--delete" class="div-table-button--delete"
size="small" size="small"
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
@ -197,7 +210,7 @@ export default {
return { return {
loading: false, loading: false,
total: 0, total: 0,
pageSize: 10, pageSize: 20,
pageNo: 0, pageNo: 0,
tableLoading: false, tableLoading: false,
agencyId: '', agencyId: '',

23
src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue

@ -41,6 +41,29 @@
label-width="150px"> label-width="150px">
<span class="detail_span">{{formData.address}}</span> <span class="detail_span">{{formData.address}}</span>
</el-form-item> </el-form-item>
<el-form-item label="位置坐标"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width: 500px">
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="formData.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="formData.latitude">
</el-input>
</div>
</div>
</el-form-item>
</el-form> </el-form>
</div> </div>

38
src/views/modules/shequzhili/ggfwtc/ggfwForm.vue

@ -30,9 +30,9 @@
filterable filterable
clearable> clearable>
<el-option v-for="item in serviceList" <el-option v-for="item in serviceList"
:key="item.categoryKey" :key="item.value"
:label="item.categoryName" :label="item.label"
:value="item.categoryKey"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -154,7 +154,7 @@
latitude: 120.38945519 // latitude: 120.38945519 //
}, },
serviceList: [],//list serviceList: [],//list
publicServiceData: {},
} }
}, },
components: {}, components: {},
@ -210,12 +210,11 @@
let params = { let params = {
icPublicServiceId: this.icPublicServiceId icPublicServiceId: this.icPublicServiceId
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
if (!data.serviceMatterList || !Array.isArray(data.serviceMatterList)) { console.log(data)
data.serviceMatterList = [] if (null != data) {
data: this.publicServiceData
} }
this.formData = { ...data } this.formData = { ...data }
@ -247,24 +246,13 @@
}, },
async addUnit () { async addUnit () {
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; // let url = ''
// if (regPhone.test(this.formData.contactMobile) === false) { if (this.formType === 'add'){
// this.btnDisable = false url = '/gov/org/icPublicService/add'
// this.$message({ }else {
// type: 'warning', url = '/gov/org/icPublicService/edit'
// message: '' }
// })
// return false;
// }
let url = '/gov/org/icPublicService/add'
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/add"
// if (this.formType === 'edit') {
// this.formData.id = this.unitId
// }
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',

149
src/views/modules/shequzhili/tuceng/anquan/weihua/index.vue

@ -0,0 +1,149 @@
<template>
<div>
<base-page
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:infoUrl="infoUrl"
:exportUrl="exportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
idName="icDangerousChemicalsId"
></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
export default {
props: {},
data() {
return {
searchParams: [
{ field: "企业名称", keyName: "name", type: "input" },
{
field: "企业类型",
keyName: "category",
type: "select",
optionUrl: "/gov/org/coverage/dict-select-list/dangerous_chemicals",
optionUrlParams: {},
optionList: [],
},
{
field: "危化品种类",
keyName: "dangerType",
type: "select",
optionUrl: "/sys/dict/data/dictlist",
optionUrlParams: {
dictType: "ic_danger_type",
},
optionList: [],
},
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
{ field: "企业名称", keyName: "name", type: "text" },
{ field: "企业类别", keyName: "categoryName", type: "text" },
{ field: "周边安全间距", keyName: "safeDistanceName", type: "text" },
{ field: "危化品种类", keyName: "dangerTypeName", type: "text" },
{ field: "经营地址", keyName: "address", type: "text" },
{ field: "负责人", keyName: "principalName", type: "text" },
{ field: "联系电话", keyName: "principalMobile", type: "text" },
{ field: "备注", keyName: "remark", type: "text" },
],
tableUrl: "/gov/org/icDangerousChemicals/list",
mubanUrl: "/gov/org/icDangerousChemicals/download",
importUrl: "/gov/org/icDangerousChemicals/import",
exportUrl: "/gov/org/icDangerousChemicals/export",
addUrl: "/gov/org/icDangerousChemicals/add",
editUrl: "/gov/org/icDangerousChemicals/edit",
infoUrl: "/gov/org/icDangerousChemicals/detail",
delUrl: "/gov/org/icDangerousChemicals/del",
editParams: [
{
field: "企业名称",
keyName: "name",
type: "input",
maxlength: 100,
editDisabled: true,
rules: [
{
required: true,
message: "企业名称不能为空",
trigger: "blur",
},
],
},
{
field: "企业分类",
keyName: "category",
type: "select",
optionUrl: "/gov/org/coverage/dict-select-list/dangerous_chemicals",
optionUrlParams: {
// dictType: "ic_service_type",
},
optionList: [],
editDisabled: true,
rules: [
{ required: true, message: "企业分类不能为空", trigger: "blur" },
],
},
{
field: "周边安全间距",
keyName: "safeDistance",
type: "number",
min: 0,
max: 1000000000,
unitName: "公里",
},
{
field: "危化品种类",
keyName: "dangerType",
type: "select",
optionUrl: "/sys/dict/data/dictlist",
optionUrlParams: {
dictType: "ic_danger_type",
},
optionList: [],
editDisabled: true,
},
{ field: "负责人", keyName: "principalName", type: "input" },
{ field: "联系电话", keyName: "principalMobile", type: "input" },
{
field: "经营地址",
keyName: "address",
type: "address",
supKeys: ["longitude", "latitude"],
supValues: ["", ""],
rules: [
{
required: true,
message: "经营地址坐标不能为空",
trigger: "blur",
},
],
},
{ field: "备注", keyName: "remark", type: "textarea" },
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

536
src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record.vue

@ -0,0 +1,536 @@
<template>
<div class="m-record" style="padding: 0 20px">
<h3>巡查记录</h3>
<div class="mt10" v-if="formType == 'edit'">
<el-button
size="small"
class="diy-button--add"
:disabled="btnDisabled || disabled"
@click="handleAdd"
>新增</el-button
>
</div>
<el-table
:data="tableData"
row-key="id"
border
style="width: 100%"
class="resi-table"
height="400px"
:header-cell-style="getRowClass"
>
<el-table-column label="序号" type="index" align="center" width="50">
</el-table-column>
<el-table-column
prop="patrolTime"
label="巡查时间"
align="center"
width="200px"
>
<template slot-scope="scope">
<el-date-picker
v-if="scope.row.isEdit"
v-model="scope.row.patrolTime"
type="date"
class="input-width"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
<div v-else class="div-content">{{ scope.row.patrolTime }}</div>
</template>
</el-table-column>
<el-table-column
prop="staffId"
label="巡查人员"
align="center"
width="200px"
>
<template slot-scope="scope">
<el-select
v-if="scope.row.isEdit"
v-model="scope.row.staffId"
placeholder="请选择"
class="input-width"
@change="handleChangeStaff(scope.row)"
clearable
>
<el-option
v-for="subItem in optionStaff"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
>
</el-option>
</el-select>
<div v-else class="div-content">{{ scope.row.staffName }}</div>
</template>
</el-table-column>
<el-table-column
prop="mobile"
label="联系电话"
align="center"
width="200px"
>
<template slot-scope="scope">
<el-input
v-if="scope.row.isEdit"
type="number"
v-model="scope.row.mobile"
placeholder="请输入"
class="input-width"
clearable
disabled
></el-input>
<div v-else class="div-content">{{ scope.row.mobile }}</div>
</template>
</el-table-column>
<el-table-column
prop="result"
label="巡查结果"
align="center"
width="200px"
>
<template slot-scope="scope">
<el-select
v-if="scope.row.isEdit"
v-model="scope.row.result"
placeholder="请选择"
class="input-width"
size="small"
clearable
>
<el-option
v-for="subItem in optionResult"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
>
</el-option>
</el-select>
<div v-else class="div-content">{{ scope.row.resultName }}</div>
</template>
</el-table-column>
<el-table-column
prop="detailed"
label="隐患明细"
align="center"
width="200px"
>
<template slot-scope="scope">
<el-input
v-if="scope.row.isEdit"
type="number"
v-model="scope.row.detailed"
placeholder="请输入"
class="input-width"
maxlength="500"
clearable
></el-input>
<div v-else class="div-content">{{ scope.row.detailed }}</div>
</template>
</el-table-column>
<el-table-column
prop="imgList"
label="图片列表"
align="center"
width="150px"
>
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-upload
class="avatar-uploader"
:action="uploadUrl"
:data="{ customerId: customerId }"
:show-file-list="true"
:limit="3"
:file-list="scope.row.imgShowList"
:on-success="(res) => handleImgSuccess(res, scope.row)"
:on-remove="(res) => handleImgRemove(res, scope.row)"
list-type="picture"
:before-upload="beforeImgUpload"
>
<i class="el-icon-plus avatar-uploader-icon"></i> 最多三张图片
</el-upload>
</div>
<div v-else class="div-content">
<el-image
v-if="scope.row.imgList.length > 0"
style="width: 100px; height: 50px"
:src="scope.row.imgList[0]"
fit="cover"
:preview-src-list="scope.row.imgList"
></el-image>
</div>
</template>
</el-table-column>
<el-table-column
prop="reviewTime"
label="拟复查时间"
align="center"
width="200px"
>
<template slot-scope="scope">
<el-date-picker
v-if="scope.row.isEdit"
v-model="scope.row.reviewTime"
type="date"
class="input-width"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
<div v-else class="div-content">{{ scope.row.patrolTime }}</div>
</template>
</el-table-column>
<el-table-column v-if="!disabled" label="操作" align="center" width="120">
<template slot-scope="scope">
<template v-if="scope.row.isEdit">
<el-button
@click="handleEdit(scope.row)"
type="text"
size="small"
class="btn-color-edit"
>保存</el-button
>
<el-button
@click="handleChange(scope.row, 'cancle')"
type="text"
size="small"
class="btn-color-edit"
>取消</el-button
>
</template>
<template v-else>
<el-button
v-if="formType == 'edit'"
@click="handleChange(scope.row, 'edit')"
type="text"
size="small"
:disabled="disabled"
class="btn-color-edit"
>修改</el-button
>
<el-popconfirm
v-if="formType == 'edit'"
title="删除之后无法恢复,确认删除?"
@onConfirm="del(scope.row)"
>
<el-button
slot="reference"
type="text"
size="small"
class="btn-color-del"
style="margin-left: 10px"
>删除</el-button
>
</el-popconfirm>
</template>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
export default {
props: {
enterpriseId: {
type: String,
default: "",
},
enterpriseInfo: {
type: Object,
default: () => ({}),
},
disabled: {
type: Boolean,
default: false,
},
formType: {
type: String,
default: "",
},
},
data() {
return {
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
customerId: localStorage.getItem("customerId"),
btnDisabled: false,
btnType: "cancle",
isEdit: false,
tableData: [],
tempRow: {},
optionResult: [
{
label: "合格",
value: "0",
},
{
label: "不合格",
value: "1",
},
],
optionStaff: [
// {
// label: "",
// value: "staffId",
// },
],
};
},
computed: {
allowOperate() {
const {
enterpriseInfo: { agencyId },
} = this;
return agencyId && agencyId == this.$store.state.user.agencyId;
},
},
watch: {
enterpriseId: {
handler(val) {
console.log("val------points", val);
if (val.length > 0) {
this.btnDisabled = false;
this.getList();
} else this.btnDisabled = true;
},
immediate: true,
},
},
created() {
this.getOptionStaff();
},
methods: {
beforeImgUpload(file) {
console.log(file);
const isLt1M = file.size / 1024 / 1024 < 10;
const srcType = file.type;
const format = file.name.split(".").pop();
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
return false;
}
if (srcType.indexOf("image") == -1) {
this.$message.error("仅限图片格式");
return false;
}
return true;
},
handleImgSuccess(res, row) {
console.log("handleImgSuccess", res);
if (res.code === 0 && res.msg === "success") {
row.imgList.push(res.data.url);
this.computeImgShowList(row);
} else {
this.$message.error(res.msg);
}
},
computeImgShowList(row) {
row.imgShowList = row.imgList.map((url) => {
return { name: "", url };
});
},
handleImgRemove(file, row) {
console.log("handleImgRemove", file);
if (file.response) {
row.imgList = row.imgList.map(
(item) => item !== file.response.data.url
);
this.computeImgShowList(row);
}
},
getRowClass({ rowIndex, columnIndex }) {
if (rowIndex === 0) {
return "background: #2195fe; color: #fff;";
}
},
handleChange(row, type) {
console.log("type----", type);
if (type == "cancle") {
row = { ...this.tempRow };
row.isEdit = false;
if (this.btnType == "add") this.tableData.pop();
this.getList();
console.log("row----", row);
} else {
this.tempRow = { ...row };
row.isEdit = true;
}
this.btnType = type;
this.isEdit = !this.isEdit;
},
handleChangeStaff(row) {
const { staffId } = row;
const { optionStaff } = this;
let item = optionStaff.find((item) => item.value == staffId);
if (item) {
row.staffName = item.name;
row.mobile = item.mobile;
}
},
async getOptionStaff() {
let url = `/data/aggregator/org/staff-select-list/${this.$store.state.user.agencyId}`;
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
this.optionStaff = data || [];
} else {
this.$message.error("请求工作人员数据失败!");
}
},
async handleEdit(row) {
if (this.btnType == "add") this.save(row);
else this.edit(row);
},
handleAdd() {
this.btnType = "add";
this.isEdit = true;
const item = {
isEdit: true,
enterpriseId: this.enterpriseId,
patrolTime: "",
staffId: "",
staffName: "",
mobile: "",
result: "",
imgList: [],
reviewTime: "",
};
this.computeImgShowList(item);
this.tableData.push(item);
},
async save(row) {
const params = {
partyMemberId: this.enterpriseId,
...row,
};
await this.$http
.post("/gov/org/enterprise/addorupdate-patrol", params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$message.success("保存成功");
row.isEdit = false;
this.isEdit = false;
this.btnType = "cancle";
this.getList();
}
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
async edit(row) {
const params = {
...row,
};
await this.$http
.post("/gov/org/enterprise/addorupdate-patrol", params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$message.success("保存成功");
row.isEdit = false;
this.isEdit = false;
this.getList();
}
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
async del(row) {
await this.$http
.post(`/gov/org/enterprise/del-patrol/${row.patrolId}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$message.success("删除成功");
this.getList();
}
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
async getList() {
const { enterpriseId } = this;
const params = {};
await this.$http
.post(`/gov/org/enterprise/patrollist/${enterpriseId}`, {
params,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.tableData = res.data.list.map((item) => {
this.computeImgShowList(item);
return {
...item,
isEdit: false,
};
});
}
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
},
};
</script>
<style lang="scss" scoped>
.m-record {
.mt10 {
margin-bottom: 10px;
}
.input-width {
width: 170px;
}
}
</style>

234
src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue

@ -0,0 +1,234 @@
<template>
<div>
<base-page
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:infoUrl="infoUrl"
:editAuth="editAuth"
:delAuth="delAuth"
:exportUrl="exportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
:editFixedParams="editFixedParams"
:editParamsDiv="5"
:editBtnName="(item) => (item.sourceType == 'import' ? '待完善' : '修改')"
idName="enterpriseId"
>
<template v-slot:editElse="{ id, formType, info }">
<record v-if="formType != 'add' && id" :formType="formType" :enterpriseId="id" :enterpriseInfo="info"></record>
</template>
</base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
import record from "./cpts/record";
export default {
components: { basePage, record },
props: {},
data() {
return {
searchParams: [
{ field: "场所名称", keyName: "placeOrgName", type: "input" },
{ field: "联系电话", keyName: "mobile", type: "input" },
{
field: "场所区域",
keyName: "gridId",
type: "select",
optionUrl: "/gov/org/customergrid/gridoption",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
purpose: "query",
},
optionList: [],
},
{
field: "场所类型",
keyName: "placeType",
type: "select",
optionUrl: "/gov/org/coverage/dict-select-list/enterprise_patrol",
optionUrlParams: {},
optionList: [],
},
{
field: "规模",
keyName: "scale",
type: "select",
optionUrl: "/sys/dict/data/dictlist",
optionUrlParams: {
dictType: "scale",
},
optionList: [],
},
{
field: "巡查结果",
keyName: "result",
type: "select",
optionUrl: "",
optionUrlParams: {},
optionList: [
{
value: "0",
label: "合格",
},
{
value: "1",
label: "不合格",
},
],
},
{ field: "隐患明细", keyName: "detailed", type: "input" },
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
{ field: "场所名称", keyName: "placeOrgName", type: "text" },
{ field: "场所地址", keyName: "address", type: "text" },
{ field: "场所类型", keyName: "placeTypeName", type: "text" },
{ field: "规模", keyName: "scale", type: "text" },
{ field: "负责人", keyName: "personInCharge", type: "text" },
{ field: "联系电话", keyName: "mobile", type: "text" },
{ field: "最新检查时间", keyName: "latestPatrolTime", type: "text" },
{ field: "最新结果", keyName: "latestResultName", type: "text" },
],
tableUrl: "/gov/org/enterprise/list",
mubanUrl: "/gov/org/enterprise/download-tem",
importUrl: "/gov/org/enterprise/import",
exportUrl: "/gov/org/enterprise/export",
addUrl: "/gov/org/enterprise/addOrUpdate",
editUrl: "/gov/org/enterprise/addOrUpdate",
infoUrl: "/gov/org/enterprise/detail/",
delUrl: "/gov/org/enterprise/delete/",
editAuth(item) {
return item.agencyId == this.$store.state.user.agencyId;
},
delAuth(item) {
return item.agencyId == this.$store.state.user.agencyId;
},
editParams: [
{
field: "场所类型",
keyName: "placeType",
type: "select",
optionUrl: "/gov/org/coverage/dict-select-list/enterprise_patrol",
optionUrlParams: {
// dictType: "ic_service_type",
},
optionList: [],
editDisabled: true,
rules: [
{ required: true, message: "场所类型不能为空", trigger: "blur" },
],
},
{
field: "场所区域",
keyName: "gridId",
type: "select",
optionUrl: "/gov/org/customergrid/gridoption",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
purpose: "addorupdate",
},
optionList: [],
editDisabled: true,
rules: [
{ required: true, message: "场所区域不能为空", trigger: "blur" },
],
},
{
field: "场所名称",
keyName: "placeOrgName",
type: "input",
maxlength: 100,
editDisabled: true,
rules: [
{
required: true,
message: "场所名称不能为空",
trigger: "blur",
},
],
},
{
field: "规模",
keyName: "scale",
type: "select",
optionUrl: "/sys/dict/data/dictlist",
optionUrlParams: {
dictType: "scale",
},
optionList: [],
editDisabled: false,
rules: [
{
required: true,
message: "规模不能为空",
trigger: "blur",
},
],
},
{
field: "负责人",
keyName: "personInCharge",
type: "input",
rules: [
{
required: true,
message: "负责人不能为空",
trigger: "blur",
},
],
},
{
field: "联系电话",
keyName: "mobile",
type: "input",
rules: [
{
required: true,
message: "联系电话不能为空",
trigger: "blur",
},
],
},
{
field: "场所地址",
keyName: "address",
type: "address",
supKeys: ["longitude", "latitude"],
supValues: ["", ""],
rules: [
{
required: true,
message: "场所地址坐标不能为空",
trigger: "blur",
},
],
},
],
editFixedParams: {
agencyId: this.$store.state.user.agencyId,
},
};
},
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

130
src/views/modules/shequzhili/tuceng/yingji/ziyuan/index.vue

@ -0,0 +1,130 @@
<template>
<div>
<base-page
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:infoUrl="infoUrl"
:exportUrl="exportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
idName="icSuperiorResourceId"
></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
export default {
props: {},
data() {
return {
searchParams: [
{ field: "场所名称", keyName: "name", type: "input" },
{
field: "场所分类",
keyName: "category",
type: "select",
optionUrl: "/gov/org/coverage/dict-select-list/superior_resource",
optionUrlParams: {},
optionList: [],
},
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
{ field: "场所名称", keyName: "name", type: "text" },
{ field: "场所类别", keyName: "categoryName", type: "text" },
{ field: "占地面积", keyName: "areaCoveredName", type: "text" },
{ field: "容纳人数", keyName: "capacityName", type: "text" },
{ field: "地址", keyName: "address", type: "text" },
],
tableUrl: "/gov/org/icSuperiorResource/list",
mubanUrl: "/gov/org/icSuperiorResource/download",
importUrl: "/gov/org/icSuperiorResource/import",
exportUrl: "/gov/org/icSuperiorResource/export",
addUrl: "/gov/org/icSuperiorResource/add",
editUrl: "/gov/org/icSuperiorResource/edit",
infoUrl: "/gov/org/icSuperiorResource/detail",
delUrl: "/gov/org/icSuperiorResource/del",
editParams: [
{
field: "场所名称",
keyName: "name",
type: "input",
maxlength: 100,
editDisabled: true,
rules: [
{
required: true,
message: "场所名称不能为空",
trigger: "blur",
},
],
},
{
field: "场所分类",
keyName: "category",
type: "select",
optionUrl: "/gov/org/coverage/dict-select-list/superior_resource",
optionUrlParams: {
// dictType: "ic_service_type",
},
optionList: [],
editDisabled: true,
rules: [
{ required: true, message: "场所分类不能为空", trigger: "blur" },
],
},
{
field: "占地面积",
keyName: "areaCovered",
type: "number",
min: 0,
max: 1000000000,
unitName: "平方公里",
},
{
field: "容纳人数",
keyName: "capacity",
type: "number",
min: 0,
max: 1000000000,
// unitName: "",
},
{
field: "位置坐标",
keyName: "address",
type: "address",
supKeys: ["longitude", "latitude"],
supValues: ["", ""],
rules: [
{
required: true,
message: "地址坐标不能为空",
trigger: "blur",
},
],
},
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

35
src/views/modules/shequzhili/tuceng/zhonghe/anzhibangjiao.vue

@ -0,0 +1,35 @@
<template>
<div>
<base-page :elseParams="elseParams"></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/shequzhili/tuceng/zhonghe/base";
export default {
props: {},
data() {
return {
elseParams: [
{
queryType: "list_equal",
tableName: "ic_special",
columnName: "SPECIAL_RQLB",
columnValue: ["anzhibangjiao"],
},
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

777
src/views/modules/shequzhili/tuceng/zhonghe/base.vue

@ -0,0 +1,777 @@
<template>
<div class="resi-container">
<el-card ref="searchCard" class="search-card">
<el-form
ref="searchForm"
:inline="true"
:model="fmData"
:label-width="'100px'"
class="demo-form-inline"
>
<div>
<el-form-item prop="gridId" label="所属网格">
<div class="resi-cell-value">
<el-select
v-model.trim="fmData.gridId"
placeholder="请选择网格"
size="small"
clearable
class="resi-cell-select"
@change="handleChangeGrid"
>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="所属房屋">
<div class="resi-cell-value">
<div class="resi-cell-col">
<el-form-item prop="villageId">
<el-select
v-model.trim="fmData.villageId"
placeholder="请选择小区"
size="small"
clearable
class="resi-cell-select"
@change="handleChangeV"
>
<el-option
v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="buildId">
<el-select
v-model.trim="fmData.buildId"
placeholder="楼号"
size="small"
clearable
:disabled="changeVDisabled"
class="resi-cell-select resi-cell-select-middle"
@change="handleChangeB"
>
<el-option
v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="unitId">
<el-select
v-model.trim="fmData.unitId"
placeholder="单元"
size="small"
clearable
:disabled="changeBDisabled"
class="resi-cell-select resi-cell-select-middle"
@change="handleChangeD"
>
<el-option
v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="homeId">
<el-select
v-model.trim="fmData.homeId"
placeholder="房号"
size="small"
clearable
:disabled="changeDDisabled"
class="resi-cell-select resi-cell-select-middle"
>
<el-option
v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</div>
</div>
</el-form-item>
</div>
<div>
<el-form-item label="姓名" prop="name">
<el-input
v-model="fmData.name"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="fmData.mobile"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input
v-model="fmData.idCard"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="handleSearch"
>查询</el-button
>
<el-button
class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button
>
</el-form-item>
</div>
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="handleChu" class="diy-button--reset" size="small"
>导出</el-button
>
</div>
<el-table
:data="tableData"
border
style="width: 100%"
class="resi-table"
:height="tableHeight"
>
<el-table-column
label="序号"
fixed="left"
type="index"
align="center"
width="50"
/>
<el-table-column
prop="GRID_ID"
align="center"
label="所属网格"
min-width="160"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="HOME_ID"
label="所属家庭"
align="center"
min-width="160"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="NAME"
align="center"
label="姓名"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="MOBILE"
width="140"
align="center"
label="手机号"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="GENDER" align="center" width="60" label="性别">
</el-table-column>
<el-table-column
prop="ID_CARD"
align="center"
min-width="160"
label="身份证号"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="BIRTHDAY"
align="center"
label="出生日期"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="REMARKS"
align="center"
label="备注"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button
@click="handleWatch(scope.$index)"
type="text"
size="small"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</el-card>
<people-more
v-if="showedPeopleMoreInfo && currentPepeleId"
:userId="currentPepeleId"
:gridName="currentPepeleGridName"
@close="showedPeopleMoreInfo = false"
/>
<el-dialog
:visible.sync="diyDialog"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="1150px"
top="5vh"
class="dialog-h"
>
<diy-info
v-if="diyDialog"
ref="ref_diy"
:list="exportList"
:search="computeQueryParams()"
@close="diyDialog = false"
></diy-info>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import peopleMore from "@/views/modules/shequ/cpts/people-more";
import diyInfo from "@/views/modules/base/diyInfo.vue";
export default {
props: {
elseParams: {
type: Array,
default: () => [],
},
},
components: { peopleMore, diyInfo },
data() {
return {
openSearch: false,
formShow: false,
formTitle: "",
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
tableData: [],
optionsV: [],
optionsB: [],
optionsH: [],
optionsD: [],
optionsG: [],
optionsWelfare: [
{
value: "1",
label: "是",
},
{
value: "0",
label: "否",
},
],
fmData: {
gridId: "",
villageId: "",
buildId: "",
unitId: "",
homeId: "",
name: "",
mobile: "",
idCard: "",
},
rangeTime: [],
searchH: 0,
tableHeight: 0,
//
showedPeopleMoreInfo: false,
currentPepeleId: "",
currentPepeleGridName: "",
diyDialog: false,
exportList: [],
};
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
maxTableHeight() {
console.log("computed-searchH---", this.searchH);
const h = this.clientHeight - this.searchH + this.iframeHeight;
const _h = this.clientHeight - this.searchH;
console.log("computed-searchH---_h", _h);
return this.$store.state.inIframe ? h : _h;
},
changeVDisabled() {
return !this.fmData.villageId;
},
changeBDisabled() {
return !this.fmData.buildId;
},
changeDDisabled() {
return !this.fmData.unitId;
},
},
watch: {
rangeTime: function (val) {
console.log("val----", val);
if (Array.isArray(val) && val.length == 2) {
this.fmData.startTime = val[0];
this.fmData.endTime = val[1];
} else {
this.fmData.startTime = "";
this.fmData.endTime = "";
}
},
searchH() {
const h = this.clientHeight - this.searchH + this.iframeHeight;
const _h = this.clientHeight - this.searchH;
console.log("computed-searchH---_h", _h);
this.$nextTick(() => {
this.tableHeight = this.$store.state.inIframe ? h : _h;
});
},
},
mounted() {
this.getGridList();
this.getValiheList();
this.getTableData();
this.searchH = this.$refs.searchCard.$el.offsetHeight + 270;
console.log("searchH----", this.$refs.searchCard.$el.offsetHeight);
},
methods: {
async handleWatch(rowIndex) {
let item = this.tableData[rowIndex];
this.currentPepeleId = item.icResiUserId;
this.currentPepeleGridName = item.GRID_ID;
await nextTick();
this.showedPeopleMoreInfo = true;
},
handleClearVillage() {
this.fmData.buildId = "";
this.fmData.homeId = "";
},
handleClearBuild() {
this.fmData.buildId = "";
this.fmData.unitId = "";
this.fmData.homeId = "";
},
handleClearDan() {
this.fmData.unitId = "";
this.fmData.homeId = "";
},
handleChangeGrid(val) {
console.log("val", val);
this.fmData.villageId = "";
this.fmData.buildId = "";
this.fmData.unitId = "";
this.fmData.homeId = "";
this.getValiheList();
},
handleChangeV(val) {
console.log("val", val);
this.fmData.buildId = "";
this.fmData.unitId = "";
this.fmData.homeId = "";
this.getBuildList();
},
handleChangeB(val) {
console.log("val", val);
this.fmData.unitId = "";
this.fmData.homeId = "";
this.getUniList();
},
handleChangeD(val) {
console.log("val", val);
this.fmData.homeId = "";
this.getHouseList();
},
getGridList() {
const { user } = this.$store.state;
this.$http
.post("/gov/org/customergrid/gridoption", {
agencyId: user.agencyId,
purpose: "query",
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsG = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getValiheList() {
const { user } = this.$store.state;
this.$http
.post("/gov/org/icneighborhood/neighborhoodoption", {
gridId: this.fmData.gridId,
agencyId: "",
// agencyId: user.agencyId
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsV = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getBuildList() {
this.$http
.post("/gov/org/icbuilding/buildingoption", {
neighborHoodId: this.fmData.villageId,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsB = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getUniList() {
this.$http
.post("/gov/org/icbuildingunit/unitoption", {
buildingId: this.fmData.buildId,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsD = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getHouseList() {
this.$http
.post("/gov/org/ichouse/houseoption", { unitId: this.fmData.unitId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsH = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
handleClose() {
this.formShow = false;
},
handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.handleSearch();
},
computeQueryParams() {
const { elseParams, fmData } = this;
return {
formCode: "resi_base_info",
pageNo: 1,
pageSize: 20,
conditions: [
{
queryType: "equal",
tableName: "ic_resi_user",
columnName: "GRID_ID",
columnValue: [fmData.gridId],
},
{
queryType: "equal",
tableName: "ic_resi_user",
columnName: "VILLAGE_ID",
columnValue: [fmData.villageId],
},
{
queryType: "equal",
tableName: "ic_resi_user",
columnName: "BUILD_ID",
columnValue: [fmData.buildId],
},
{
queryType: "equal",
tableName: "ic_resi_user",
columnName: "UNIT_ID",
columnValue: [fmData.unitId],
},
{
queryType: "equal",
tableName: "ic_resi_user",
columnName: "HOME_ID",
columnValue: [fmData.homeId],
},
{
queryType: "like",
tableName: "ic_resi_user",
columnName: "NAME",
columnValue: [fmData.name],
},
{
queryType: "like",
tableName: "ic_resi_user",
columnName: "MOBILE",
columnValue: [fmData.mobile],
},
{
queryType: "like",
tableName: "ic_resi_user",
columnName: "ID_CARD",
columnValue: [fmData.idCard],
},
...elseParams,
],
};
},
async handleChu() {
this.getExportList();
},
async getExportList() {
const url = "/oper/customize//icformitemgroup/list";
let params = {
formCode: "resi_base_info",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.forEach((item) => {
(async (id) => {
// item.queryItemList = await this.getExportChildList(id)
item.queryItemList = [];
})(item.id);
});
this.exportList = [...data];
this.$nextTick(() => {
this.diyDialog = true;
});
console.log("获取详情成功getExportList----", this.exportList);
} else {
this.$message.error(msg);
}
},
async getTableData() {
const url = "/epmetuser/icresiuser/listresi";
const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...this.computeQueryParams(),
});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
}
.resi-card-table {
margin-top: 20px;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
.resi-container .resi-card {
position: relative;
overflow: visible;
}
.demo-form-inline {
// display: flex;
// align-items: center;
// margin-bottom: 20px;
.resi-cell-label {
flex-shrink: 0;
min-width: 0;
box-sizing: border-box;
margin-right: 15px;
// text-align: right;
// line-height: 32;
}
.resi-cell-label1 {
width: max-content;
}
.resi-cell-value-radio {
display: flex;
align-items: center;
min-height: 32px;
}
.resi-cell-input {
width: 200px;
}
.resi-cell--daterange {
max-width: 260px;
}
.resi-cell-select {
width: 200px;
box-sizing: border-box;
margin-right: 10px;
&-middle {
width: 120px;
}
&-small {
width: 88px;
}
}
.resi-cell-select:last-child {
margin-right: 0;
}
}
.mt10 {
margin-top: 10px;
}
</style>

35
src/views/modules/shequzhili/tuceng/zhonghe/buliangqingshaonian.vue

@ -0,0 +1,35 @@
<template>
<div>
<base-page :elseParams="elseParams"></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/shequzhili/tuceng/zhonghe/base";
export default {
props: {},
data() {
return {
elseParams: [
{
queryType: "list_equal",
tableName: "ic_special",
columnName: "SPECIAL_RQLB",
columnValue: ["buliangqingshaonian"],
},
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

35
src/views/modules/shequzhili/tuceng/zhonghe/shequjiaozheng.vue

@ -0,0 +1,35 @@
<template>
<div>
<base-page :elseParams="elseParams"></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/shequzhili/tuceng/zhonghe/base";
export default {
props: {},
data() {
return {
elseParams: [
{
queryType: "list_equal",
tableName: "ic_special",
columnName: "SPECIAL_RQLB",
columnValue: ["shequjiaozheng"],
},
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

35
src/views/modules/shequzhili/tuceng/zhonghe/xidurenyuanvue.vue

@ -0,0 +1,35 @@
<template>
<div>
<base-page :elseParams="elseParams"></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/shequzhili/tuceng/zhonghe/base";
export default {
props: {},
data() {
return {
elseParams: [
{
queryType: "list_equal",
tableName: "ic_special",
columnName: "SPECIAL_RQLB",
columnValue: ["xidurenyuan"],
},
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

35
src/views/modules/shequzhili/tuceng/zhonghe/xiejiaorenyuan.vue

@ -0,0 +1,35 @@
<template>
<div>
<base-page :elseParams="elseParams"></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/shequzhili/tuceng/zhonghe/base";
export default {
props: {},
data() {
return {
elseParams: [
{
queryType: "list_equal",
tableName: "ic_special",
columnName: "SPECIAL_RQLB",
columnValue: ["xiejiaorenyuan"],
},
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

83
src/views/modules/shequzhili/tuceng/zhonghe/xinfang.vue

@ -1,94 +1,25 @@
<template> <template>
<div> <div>
<base-page <base-page :elseParams="elseParams"></base-page>
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:exportUrl="exportUrl"
:editParams="editParams"
></base-page>
</div> </div>
</template> </template>
<script> <script>
import basePage from "@/views/modules/cpts/base/index"; import basePage from "@/views/modules/shequzhili/tuceng/zhonghe/base";
export default { export default {
props: {}, props: {},
data() { data() {
return { return {
searchParams: [ elseParams: [
{ {
field: "服务类别", queryType: "equal",
keyName: "serviceType", tableName: "ic_resi_user",
type: "select", columnName: "IS_XFRY",
optionUrl: "/sys/dict/data/dictlist", columnValue: ["1"],
optionUrlParams: {
dictType: "ic_service_type",
},
optionList: [],
}, },
{ field: "服务组织", keyName: "orgName", type: "input" },
{ field: "服务地址", keyName: "address", type: "input" },
{ field: "备注", keyName: "remark", type: "input" },
], ],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
{ field: "服务类别", keyName: "serviceType", type: "text" },
{ field: "服务组织名称", keyName: "orgName", type: "text" },
{ field: "服务地址", keyName: "address", type: "text" },
{ field: "备注", keyName: "remark", type: "text" },
],
tableUrl: "/heart/icServiceOrg/list",
exportUrl: "/gov/project/icEvent/export",
editParams: [
{
field: "服务类别",
keyName: "serviceType",
type: "select",
optionUrl: "/sys/dict/data/dictlist",
optionUrlParams: {
dictType: "ic_service_type",
},
optionList: [],
editDisabled: true,
rules: [
{ required: true, message: "服务类别不能为空", trigger: "blur" },
],
},
{
field: "服务组织",
keyName: "orgName",
type: "input",
maxlength: 100,
editDisabled: true,
rules: [
{
required: true,
message: "服务组织名称不能为空",
trigger: "blur",
},
],
},
{
field: "服务地址",
keyName: "address",
type: "address",
supKeys: ["longitude", "latitude"],
supValues: ["", ""],
},
{ field: "备注", keyName: "remark", type: "input" },
],
addUrl: "/heart/icServiceOrg/add",
editUrl: "/heart/icServiceOrg/edit",
delUrl: "/heart/icServiceOrg/del",
}; };
}, },
components: { basePage }, components: { basePage },

35
src/views/modules/shequzhili/tuceng/zhonghe/zhaoshizhaohuojingshenbing.vue

@ -0,0 +1,35 @@
<template>
<div>
<base-page :elseParams="elseParams"></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/shequzhili/tuceng/zhonghe/base";
export default {
props: {},
data() {
return {
elseParams: [
{
queryType: "list_equal",
tableName: "ic_special",
columnName: "SPECIAL_RQLB",
columnValue: ["zhaoshizhaohuojingshenbing"],
},
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>
Loading…
Cancel
Save