Browse Source

Merge branch 'master' into shibei_master

master^2
dai 4 years ago
parent
commit
6382a02157
  1. 19
      src/assets/scss/modules/management/form-main.scss
  2. 3
      src/assets/scss/modules/management/list-main.scss
  3. 8
      src/mixins/view-module.js
  4. 36
      src/utils/cascader.js
  5. 2
      src/views/modules/base/collect.vue
  6. 4
      src/views/modules/base/epidemic/antiInfo.vue
  7. 4
      src/views/modules/base/epidemic/natInfo/natList.vue
  8. 7
      src/views/modules/base/organization/organization.vue
  9. 221
      src/views/modules/communityParty/article/cpts/offline.vue
  10. 394
      src/views/modules/communityParty/article/drafts.vue
  11. 524
      src/views/modules/communityParty/article/index.vue
  12. 354
      src/views/modules/communityParty/heart/heartAudit.vue
  13. 376
      src/views/modules/communityParty/heart/heartFinish.vue
  14. 1067
      src/views/modules/communityParty/heart/heartForm.vue
  15. 680
      src/views/modules/communityParty/heart/heartList.vue
  16. 291
      src/views/modules/communityParty/heart/heartPerson.vue
  17. 214
      src/views/modules/communityParty/heart/heartReview.vue
  18. 543
      src/views/modules/cpts/base/cpts/edit.vue
  19. 141
      src/views/modules/cpts/base/index.vue
  20. 9
      src/views/modules/plugins/change/resideath.vue
  21. 174
      src/views/modules/plugins/point/icpointNoice.vue
  22. 464
      src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
  23. 544
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue
  24. 601
      src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
  25. 521
      src/views/modules/plugins/point/icpointvaccinesinoculation.vue
  26. 145
      src/views/modules/plugins/rent/hikerrorinfo-add-or-update.vue
  27. 60
      src/views/modules/plugins/rent/hikerrorinfo.vue
  28. 50
      src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue
  29. 2
      src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue
  30. 15
      src/views/modules/visual/basicinfo/cpts/incident-info.vue
  31. 71
      src/views/modules/visual/basicinfo/people.vue
  32. 2063
      src/views/modules/visual/communityGovern/fivelayers/mapIndex copy 2.vue
  33. 1987
      src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue
  34. 2071
      src/views/modules/visual/communityGovern/fivelayers/mapIndex-baidu.vue
  35. 32
      src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue
  36. 4
      src/views/modules/visual/components/screen-map/index.vue
  37. 17
      src/views/modules/visual/cpts/tb.vue
  38. 2
      src/views/modules/workPc/guidance/DetailForm.vue

19
src/assets/scss/modules/management/form-main.scss

@ -21,6 +21,18 @@
.list_item_width_2 {
width: 135px;
}
.list_item_width_3 {
width: 185px;
}
.item_width_5{
width: 320px;
}
.item_width_6{
width: 404px;
}
}
@ -51,7 +63,14 @@
}
}
.form_flex{
display:flex;
justify-content: space-around;
.form_item{
width:50%;
}
}
.twoline {
display: -webkit-box;

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

@ -19,6 +19,9 @@
.item_width_1{
width: 260px;
}
.item_width_3{
width: 200px;
}
.item_width_2{
width: 160px;
}

8
src/mixins/view-module.js

@ -102,14 +102,6 @@ export default {
this.page = 1
this.query()
},
// 新增 / 修改
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle (id) {
if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) {

36
src/utils/cascader.js

@ -0,0 +1,36 @@
export function getItemByIdInCascader(arr, vals, idName, childName) {
let item = arr.find((v) => v[idName] == vals[0]);
if (vals.length > 1) {
return [
item,
...getItemByIdInCascader(
item[childName],
vals.slice(1),
idName,
childName
),
];
} else {
return [item];
}
}
export function collapse(arr, childName) {
if (arr.length > 0) {
let ret = [...arr];
arr.forEach((element) => {
let childs = element[childName];
if (childs && Array.isArray(childs)) {
ret.push(...collapse(childs, childName));
}
});
return ret;
} else {
return [];
}
}
export default {
getItemByIdInCascader,
collapse,
};

2
src/views/modules/base/collect.vue

@ -110,7 +110,7 @@
prop="houseType"
align="center"
width="100"
label="自有/租住"
label="房屋状态"
>
<template slot-scope="scope">
<span v-if="scope.row.houseType == 1">出租</span>

4
src/views/modules/base/epidemic/antiInfo.vue

@ -152,6 +152,7 @@
<el-table class="table"
:data="tableData"
border
ref="ref_table"
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
@ -554,6 +555,9 @@ export default {
await this.loadTable()
this.sHeight = this.$refs.div_search.offsetHeight + 230
},
activated () {
this.$refs['ref_table'].doLayout()
},
methods: {
handleCnalceForm () {

4
src/views/modules/base/epidemic/natInfo/natList.vue

@ -332,6 +332,10 @@ export default {
await this.loadTable()
},
activated () {
this.$refs['ref_table'].doLayout()
},
methods: {
async handleSearch () {

7
src/views/modules/base/organization/organization.vue

@ -2188,7 +2188,12 @@ export default {
document.getElementById("con").innerHTML = '当前点击坐标为:<span id="pos"></span>'
var position = document.getElementById("pos");
var center = new window.TMap.LatLng(this.latitude, this.longitude);//
if(this.latitude === null || this.latitude === "" || this.longitude === null || this.longitude === ""){
var center = new window.TMap.LatLng(36.116796, 120.339959);
}else {
var center = new window.TMap.LatLng(this.latitude, this.longitude);//
}
//
var map = new window.TMap.Map("con", {
center: center

221
src/views/modules/communityParty/article/cpts/offline.vue

@ -0,0 +1,221 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form
ref="ref_form"
:inline="true"
:model="fmData"
:rules="dataRule"
class="form"
>
<el-form-item
label="文章名称"
prop="title"
label-width="150px"
style="display: block"
>
<div style="width: 610px">
{{ fmData.title || "--" }}
</div>
</el-form-item>
<el-form-item
label="下线网格 "
prop="gridIdList"
label-width="150px"
style="display: block"
>
<el-cascader
v-model="fmData.gridIdList"
placeholder="请选择"
:options="gridOptions"
:props="{
multiple: true,
value: 'value',
label: 'label',
children: 'children',
checkStrictly: false,
emitPath: false,
}"
:show-all-levels="false"
size="small"
clearable
class="item-select"
style="width: 500px"
@change="handleChangeCascader"
>
</el-cascader>
</el-form-item>
</el-form>
</div>
<div class="div_btn resi-btns">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
export default {
props: {},
data() {
return {
btnDisable: false,
fmData: {
articleId: "",
title: "",
gridIdList: [],
},
gridOptions: [],
};
},
components: {},
computed: {
dataRule() {
return {
gridIdList: [
{ required: true, message: "下线网格不能为空", trigger: "blur" },
],
};
},
},
watch: {},
async mounted() {},
methods: {
handleChangeCascader(e) {
console.log(e);
},
async initForm({ articleId, title }) {
this.fmData.articleId = articleId;
this.fmData.title = title;
this.fmData.gridIdList = [];
this.gridOptions = [];
this.getGridOpitons(articleId);
},
async getGridOpitons(articleId) {
const url = "/gov/voice/article/publishgridlist";
const params = {
articleId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
function poll(list) {
return list.map((item) => {
return {
label: item.agencyName,
value: item.agencyId,
type: "agency",
children: [
...poll(item.subAgencyGridList),
...item.gridList.map((grid) => ({
label: grid.gridName,
value: grid.gridId,
type: "grid",
})),
],
};
});
}
let gridOptions = poll([data.agencyGridList]);
console.log(gridOptions);
this.gridOptions = gridOptions;
} else {
this.$message.error(msg);
}
},
async handleComfirm() {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
}, 5000);
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
this.btnDisable = false;
} else {
this.submit();
}
});
},
async submit() {
let url = "/gov/voice/article/offlinearticle";
let params = { ...this.fmData };
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "操作成功",
});
this.$emit("afterOffline");
this.btnDisable = false;
} else {
this.btnDisable = false;
this.$message.error(msg);
}
},
handleCancle() {
this.$emit("close");
},
},
};
</script>
<style lang="scss" scoped>
.item_width_1 {
width: 500px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map {
margin-top: 10px;
}
.div_btn {
// display: flex;
// justify-content: flex-end;
}
.el-tabs {
margin: 0 20px;
}
.el-upload__tip {
color: rgb(155, 155, 155);
margin: 0;
}
.form {
margin-top: 30px;
}
.attachement-list {
}
</style>

394
src/views/modules/communityParty/article/drafts.vue

@ -0,0 +1,394 @@
<template>
<div>
<base-page
ref="basePage"
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:editAuth="editAuth"
:delAuth="delAuth"
:infoUrl="infoUrl"
:exportUrl="exportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
:editFixedParams="editFixedParams"
:editElseRules="editElseRules"
:editConfig="editConfig"
:editParamsDiv="5"
:infoAuth="() => false"
:formBtnFixed="true"
idName="draftId"
>
<template v-slot:editOperateSup="{ id, formType, info }">
<el-button
v-if="formType != 'watch' && info.richTextFlag == '1'"
type="warning"
size="small"
:disabled="draftBtnDisable"
@click="handleClickDraft(info)"
>存草稿</el-button
>
</template>
</base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
import { getItemByIdInCascader, collapse } from "@/utils/cascader";
import { requestPost } from "@/js/dai/request";
import dateFormat from "dai-js/tools/dateFormat.js";
export default {
props: {},
data() {
return {
draftBtnDisable: false,
searchParams: [
{ field: "文章标题", keyName: "title", type: "input" },
{
field: "创建时间",
keyName: "createdTime",
type: "date-range",
supKeys: ["startDate", "endDate"],
supValues: ["", ""],
},
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
{ field: "文章标题", keyName: "title", type: "text" },
{ field: "创建时间", keyName: "createdTime", type: "text" },
],
tableUrl: "/gov/voice/draft/draftListV2",
mubanUrl: "",
importUrl: "",
exportUrl: "",
addUrl: "",
editUrl: "/gov/voice/article/addOrSaveDraft",
infoUrl: "/gov/voice/draft/detailV2",
delUrl: "/gov/voice/draft/deletedraft",
editAuth(item) {
return true;
},
delAuth(item) {
return true;
},
editParams: [
{
field: "文章标题",
keyName: "title",
type: "input",
maxlength: 50,
editDisabled: true,
rules: [
{
required: true,
message: "文章标题不能为空",
trigger: "blur",
},
],
},
{
field: "封面图片",
keyName: "imgArr",
type: "upload",
limit: 1,
listType: "picture-card",
editDisabled: true,
rules: [],
value: () => [],
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/article/upload",
supKeys: ["imgUrlArr", "imgUrl"],
supValues: [() => [], ""],
beforeImgUpload(file, item, that) {
console.log(file);
const isLt1M = file.size / 1024 / 1024 < 10;
const srcType = file.type;
if (!isLt1M) {
that.$message.error("上传文件大小不能超过 10MB!");
return false;
}
if (srcType.indexOf("image") == -1) {
that.$message.error("仅限图片格式");
return false;
}
return true;
},
},
{
field: "发布范围",
keyName: "gridIdList",
type: "cascader",
value: [],
supKeys: ["publishRangeDesc"],
supValues: [""],
optionUrl: "/gov/org/customeragency/agencygridtree",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
},
optionList: [],
optionProps: {
multiple: true,
value: "agencyId",
label: "agencyName",
children: "subAgencyList",
checkStrictly: false,
emitPath: false,
},
optionCook(obj) {
return [obj];
},
handleChangeFn(vals, item, that) {
console.log("handleChangeFn", vals);
const { optionList } = item;
const optionPlaneList = collapse(optionList, "subAgencyList");
if (vals.length > 0) {
let selectedList = vals.map(
(v) =>
getItemByIdInCascader(
optionPlaneList,
[v],
"agencyId",
"subAgencyList"
)[0]
);
console.log("handleChangeFn", selectedList);
let selectedFilterList = selectedList.filter(
(a) => a.level == "grid"
);
that.fmData[item["keyName"]] = selectedFilterList.map(
(a) => a.agencyId
);
that.fmData[item["supKeys"][0]] = selectedFilterList
.map((a) => a.agencyName)
.join("、");
} else {
}
},
rules: [
{
required: true,
message: "发布范围不能为空",
trigger: "blur",
},
],
},
{
field: "发布时间",
keyName: "publishDate",
type: "date",
value: dateFormat(new Date(), "yyyy-MM-dd"),
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
rules: [
{
required: true,
message: "发布时间不能为空",
trigger: "blur",
},
],
},
{
field: "发布单位",
keyName: "publisher",
type: "select",
optionUrl: "/gov/voice/article/publishagencylist",
optionList: [],
optionType: "group",
supKeys: ["publisherName", "publisherType"],
supValues: ["", ""],
optionCook(data) {
let ret = [];
const { agencyDeptList, agencyGridList, agencyId, agencyName } =
data;
if (agencyId) {
ret.push({
label: "以组织名义",
optionList: [
{
label: agencyName,
value: agencyId,
type: "agency",
},
],
});
}
if (Array.isArray(agencyDeptList) && agencyDeptList.length > 0) {
ret.push({
label: "以部门名义",
optionList: [
...agencyDeptList.map((d) => ({
label: d.agencyDeptName,
value: d.departmentId,
type: "department",
})),
],
});
}
if (Array.isArray(agencyGridList) && agencyGridList.length > 0) {
ret.push({
label: "以网格名义",
optionList: [
...agencyGridList.map((d) => ({
label: d.agencyGridName,
value: d.gridId,
type: "grid",
})),
],
});
}
return ret;
},
handleChangeFn(vals, item, that) {
const { optionList } = item;
let opts = [];
optionList.forEach((g) => {
opts = [...opts, ...g.optionList];
});
let publisher = opts.find((p) => vals == p.value);
that.fmData[item["supKeys"][0]] = publisher.label;
that.fmData[item["supKeys"][1]] = publisher.type;
},
rules: [
{
required: true,
message: "发布单位不能为空",
trigger: "blur",
},
],
},
{
field: "文章标签",
keyName: "tagNameList",
type: "select",
multiple: true,
filterable: true,
allowCreate: true,
optionUrl: "/gov/voice/tag/taglist",
optionUrlParams: {},
optionList: [],
optionCook(list) {
return list.map((item) => ({
label: item.tagName,
value: item.tagName,
}));
},
},
{
field: "内容",
keyName: "content",
type: "rich-text",
rules: [
{
required: true,
message: "内容不能为空",
trigger: "blur",
},
],
},
{
field: "置顶",
keyName: "isTop",
type: "switch",
activeValue: "1",
inactiveValue: "0",
},
],
editFixedParams: {
type: "article",
},
editElseRules: {},
editConfig: {
confirmBtnName: "发布",
cookInfoFn(data) {
if (data.richTextFlag == "0") {
data.content = data.contentList
.map((item) => {
if (item.contentType == "text") {
return `<p>${item.content}</p>`;
} else if (item.contentType == "img") {
return `<img src="${item.content}" style="max-width:100%"></img>`;
} else if (item.contentType == "video") {
return `<video src="${item.content}" style="max-width:100%" controls></video>`;
} else if (item.contentType == "file") {
return `<a src="${item.content}" target="_blank">附件:${item.fileName}</a>`;
}
})
.join(" ");
} else {
data.content =
Array.isArray(data.contentList) && data.contentList.length > 0
? data.contentList[0].content
: "";
}
if (data.imgUrl) {
data.imgArr = [
{
name: "封面",
url: data.imgUrl,
},
];
data.imgUrlArr = [data.imgUrl];
}
return data;
},
beforeSubmit(formType, fmData, that) {
if (fmData.isTop == "1" && !fmData.imgUrl) {
that.$message.error("请上传封面图片");
return false;
}
return true;
},
},
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {
async handleClickDraft(fmData) {
let url = this.addUrl;
let params = {
...fmData,
type: "draft",
};
params = this.$refs.basePage.$refs.editForm.cookBeforeSubmit(params);
if (!params.title && !params.content) {
return this.$message.error("标题或内容不能为空");
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "保存成功",
});
this.$refs.basePage.handleClose();
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped></style>

524
src/views/modules/communityParty/article/index.vue

@ -0,0 +1,524 @@
<template>
<div>
<base-page
ref="basePage"
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:editAuth="editAuth"
:delAuth="delAuth"
:infoUrl="infoUrl"
:exportUrl="exportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
:editFixedParams="editFixedParams"
:editElseRules="editElseRules"
:editConfig="editConfig"
:editParamsDiv="5"
:editBtnName="(item) => (!item.latitude ? '待完善' : '修改')"
:formBtnFixed="true"
idName="articleId"
>
<template v-slot:editOperateSup="{ id, formType, info }">
<el-button
v-if="formType != 'watch'"
type="warning"
size="small"
:disabled="draftBtnDisable"
@click="handleClickDraft(info)"
>存草稿</el-button
>
</template>
<template v-slot:listBtnSup="{ item }">
<el-button
v-if="
item.statusFlag == 'published' &&
item.agencyId == $store.state.user.agencyId
"
@click="handleOfflineShow(item)"
type="text"
size="small"
style="color: #666"
>下线</el-button
>
</template>
</base-page>
<el-dialog
:visible.sync="offlineShowed"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="下线"
width="850px"
top="5vh"
class="dialog-h"
@closed="offlineShowed = false"
>
<offline
ref="offlineForm"
@close="offlineShowed = false"
@afterOffline="handleOfflineSuccess"
></offline>
</el-dialog>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
import { getItemByIdInCascader, collapse } from "@/utils/cascader";
import { requestPost } from "@/js/dai/request";
import dateFormat from "dai-js/tools/dateFormat.js";
import offline from "./cpts/offline";
import nextTick from "dai-js/tools/nextTick";
export default {
props: {},
data() {
return {
offlineShowed: false,
draftBtnDisable: false,
searchParams: [
{ field: "文章标题", keyName: "title", type: "input" },
{
field: "标签",
keyName: "tagIds",
type: "select",
multiple: true,
optionUrl: "/gov/voice/tag/taglist",
optionUrlParams: {},
optionList: [],
optionCook(list) {
return list.map((item) => ({
label: item.tagName,
value: item.tagId,
}));
},
},
{
field: "状态",
keyName: "statusFlag",
value: "",
type: "select",
optionUrl: "",
optionUrlParams: {},
optionList: [
{
label: "已发布",
value: "published",
},
{
label: "已下线",
value: "offline",
},
],
},
{
field: "发布范围",
keyName: "publishRangeIds",
type: "cascader",
optionUrl: "/gov/org/customeragency/agencygridtree",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
},
optionList: [],
optionProps: {
multiple: false,
value: "agencyId",
label: "agencyName",
children: "subAgencyList",
checkStrictly: true,
},
optionCook(obj) {
return [obj];
},
supKeys: ["publishRangeId", "publishRangeType"],
supValues: ["", ""],
handleChangeFn(vals, item) {
const { optionList } = item;
if (vals.length > 0) {
item["supValues"][0] = vals[vals.length - 1];
item["supValues"][1] = getItemByIdInCascader(
optionList,
vals,
"agencyId",
"subAgencyList"
)[vals.length - 1]["level"];
item["supValues"][1] =
item["supValues"][1] == "grid" ? "grid" : "agency";
} else {
item["supValues"][0] = "";
item["supValues"][1] = "";
}
},
},
{
field: "发布时间",
keyName: "publishTime",
type: "date-range",
supKeys: ["startDate", "endDate"],
supValues: ["", ""],
},
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
{ field: "文章标题", keyName: "title", type: "text" },
{
field: "标签",
keyName: "tagNameList",
type: "array",
arrayDiv: "、",
},
{ field: "状态", keyName: "statusFlagName", type: "text" },
{ field: "发布单位", keyName: "publisherName", type: "text" },
{ field: "发布时间", keyName: "publishDate", type: "text" },
{
field: "发布范围",
keyName: "publishRangeDesc",
type: "text",
},
{ field: "置顶", keyName: "isTopName", type: "text" },
],
tableUrl: "/gov/voice/article/articleListV2",
mubanUrl: "",
importUrl: "",
exportUrl: "",
addUrl: "/gov/voice/article/addOrSaveDraft",
editUrl: "",
infoUrl: "/gov/voice/article/detailV2",
delUrl: "",
editAuth(item) {
return false;
},
delAuth(item) {
return false;
},
editParams: [
{
field: "文章标题",
keyName: "title",
type: "input",
maxlength: 50,
editDisabled: true,
rules: [
{
required: true,
message: "文章标题不能为空",
trigger: "blur",
},
],
},
{
field: "封面图片",
keyName: "imgArr",
type: "upload",
limit: 1,
listType: "picture-card",
editDisabled: true,
rules: [],
value: () => [],
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/article/upload",
supKeys: ["imgUrlArr", "imgUrl"],
supValues: [() => [], ""],
beforeImgUpload(file, item, that) {
console.log(file);
const isLt1M = file.size / 1024 / 1024 < 10;
const srcType = file.type;
if (!isLt1M) {
that.$message.error("上传文件大小不能超过 10MB!");
return false;
}
if (srcType.indexOf("image") == -1) {
that.$message.error("仅限图片格式");
return false;
}
return true;
},
},
{
field: "发布范围",
keyName: "gridIdList",
type: "cascader",
value: () => [],
supKeys: ["publishRangeDesc"],
supValues: [""],
optionUrl: "/gov/org/customeragency/agencygridtree",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
},
optionList: [],
optionProps: {
multiple: true,
value: "agencyId",
label: "agencyName",
children: "subAgencyList",
checkStrictly: false,
emitPath: false,
},
optionCook(obj) {
return [obj];
},
handleChangeFn(vals, item, that) {
console.log("handleChangeFn", vals);
const { optionList } = item;
const optionPlaneList = collapse(optionList, "subAgencyList");
if (vals.length > 0) {
let selectedList = vals.map(
(v) =>
getItemByIdInCascader(
optionPlaneList,
[v],
"agencyId",
"subAgencyList"
)[0]
);
console.log("handleChangeFn", selectedList);
let selectedFilterList = selectedList.filter(
(a) => a.level == "grid"
);
that.fmData[item["keyName"]] = selectedFilterList.map(
(a) => a.agencyId
);
that.fmData[item["supKeys"][0]] = selectedFilterList
.map((a) => a.agencyName)
.join("、");
} else {
}
},
rules: [
{
required: true,
message: "发布范围不能为空",
trigger: "blur",
},
],
},
{
field: "发布时间",
keyName: "publishDate",
type: "date",
value: dateFormat(new Date(), "yyyy-MM-dd"),
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
rules: [
{
required: true,
message: "发布时间不能为空",
trigger: "blur",
},
],
},
{
field: "发布单位",
keyName: "publisher",
type: "select",
optionUrl: "/gov/voice/article/publishagencylist",
optionList: [],
optionType: "group",
supKeys: ["publisherName", "publisherType"],
supValues: ["", ""],
optionCook(data) {
let ret = [];
const { agencyDeptList, agencyGridList, agencyId, agencyName } =
data;
if (agencyId) {
ret.push({
label: "以组织名义",
optionList: [
{
label: agencyName,
value: agencyId,
type: "agency",
},
],
});
}
if (Array.isArray(agencyDeptList) && agencyDeptList.length > 0) {
ret.push({
label: "以部门名义",
optionList: [
...agencyDeptList.map((d) => ({
label: d.agencyDeptName,
value: d.departmentId,
type: "department",
})),
],
});
}
if (Array.isArray(agencyGridList) && agencyGridList.length > 0) {
ret.push({
label: "以网格名义",
optionList: [
...agencyGridList.map((d) => ({
label: d.agencyGridName,
value: d.gridId,
type: "grid",
})),
],
});
}
return ret;
},
handleChangeFn(vals, item, that) {
const { optionList } = item;
let opts = [];
optionList.forEach((g) => {
opts = [...opts, ...g.optionList];
});
let publisher = opts.find((p) => vals == p.value);
that.fmData[item["supKeys"][0]] = publisher.label;
that.fmData[item["supKeys"][1]] = publisher.type;
},
rules: [
{
required: true,
message: "发布单位不能为空",
trigger: "blur",
},
],
},
{
field: "文章标签",
keyName: "tagNameList",
type: "select",
multiple: true,
filterable: true,
allowCreate: true,
optionUrl: "/gov/voice/tag/taglist",
optionUrlParams: {},
optionList: [],
optionCook(list) {
return list.map((item) => ({
label: item.tagName,
value: item.tagName,
}));
},
},
{
field: "内容",
keyName: "content",
type: "rich-text",
rules: [
{
required: true,
message: "内容不能为空",
trigger: "blur",
},
],
},
{
field: "置顶",
keyName: "isTop",
type: "switch",
activeValue: "1",
inactiveValue: "0",
},
],
editFixedParams: {
type: "article",
},
editElseRules: {},
editConfig: {
confirmBtnName: "发布",
cookInfoFn(data) {
if (data.richTextFlag == "0") {
data.content = data.contentList
.map((item) => {
if (item.contentType == "text") {
return `<p>${item.content}</p>`;
} else if (item.contentType == "img") {
return `<img src="${item.content}" style="max-width:100%"></img>`;
} else if (item.contentType == "video") {
return `<video src="${item.content}" style="max-width:100%" controls></video>`;
} else if (item.contentType == "file") {
return `<a src="${item.content}" target="_blank">附件:${item.fileName}</a>`;
}
})
.join(" ");
} else {
data.content = data.contentList[0].content;
}
if (data.imgUrl) {
data.imgArr = [
{
name: "封面",
url: data.imgUrl,
},
];
data.imgUrlArr = [data.imgUrl];
}
return data;
},
beforeSubmit(formType, fmData, that) {
if (fmData.isTop == "1" && !fmData.imgUrl) {
that.$message.error("请上传封面图片");
return false;
}
return true;
},
},
};
},
components: { basePage, offline },
computed: {},
watch: {},
async mounted() {},
methods: {
async handleOfflineShow(item) {
console.log(item);
this.offlineShowed = true;
await nextTick(100);
this.$refs.offlineForm.initForm(item);
},
handleOfflineSuccess() {
this.$refs.basePage.refresh();
this.offlineShowed = false;
},
async handleClickDraft(fmData) {
let url = this.addUrl;
let params = {
...fmData,
type: "draft",
};
params = this.$refs.basePage.$refs.editForm.cookBeforeSubmit(params);
if (!params.title && !params.content) {
return this.$message.error("标题或内容不能为空");
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "保存成功",
});
this.$refs.basePage.handleClose();
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped></style>

354
src/views/modules/communityParty/heart/heartAudit.vue

@ -0,0 +1,354 @@
<template>
<div class="dialog-h-content scroll-h">
<div class="div_table">
<el-button size="small"
class="diy-button--add"
@click="handleReject">审核拒绝</el-button>
<el-button size="small"
class="diy-button--add"
@click="handleAudit('passed')">审核通过</el-button>
<el-table class="table"
:data="tableData"
border
@selection-change="selectionChange"
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column>
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50">
</el-table-column>
<el-table-column prop="realName"
header-align="center"
align="center"
label="姓名"
:show-overflow-tooltip="true"
min-width="100">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
label="手机"
min-width="120">
</el-table-column>
<el-table-column prop="idNum"
header-align="center"
align="center"
label="身份证"
width="180">
</el-table-column>
<el-table-column prop="nickName"
header-align="center"
align="center"
label="昵称"
:show-overflow-tooltip="true"
min-width="100">
</el-table-column>
<el-table-column prop="signUpActNum"
header-align="center"
align="center"
label="报名活动个数"
width="120">
</el-table-column>
<el-table-column prop="signInActNum"
header-align="center"
align="center"
label="实际参加活动个数"
width="140">
</el-table-column>
<el-table-column prop="obtainPointsActNum"
header-align="center"
align="center"
label="获得积分活动个数"
width="140">
</el-table-column>
<el-table-column prop="signUpTime"
header-align="center"
align="center"
label="报名时间"
width="180">
</el-table-column>
<el-table-column prop="statusShow"
header-align="center"
align="center"
label="状态"
width="90">
</el-table-column>
</el-table>
</div>
<!-- 拒绝理由 -->
<el-dialog :visible.sync="cancleShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:append-to-body="true"
:title="'拒绝理由'"
width="550px"
top="5vh"
class="dialog-h"
@closed="cancleDiaClose">
<div style="padding:30px">
<el-input class="item_width_5"
type="textarea"
maxlength="100"
show-word-limit
:rows="4"
placeholder="请输入拒绝理由"
v-model="cancelReason"></el-input>
<div style="display:flex; justify-content: center;margin-top:20px">
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="cancleDiaClose">取消</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="handleAudit('refused')">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
let loading //
export default {
data () {
return {
tableLoading: false,
actId: '',
tableData: [],
actUserRelationIdList: [],
auditList: [],
cancelReason: '',
cancleShow: false,//
}
},
components: {},
mounted () {
},
methods: {
async initTable (actId) {
this.actId = actId
await this.loadTable()
},
checkSelect (row, index) {
//auditingpassedrefusedcanceled
let isChecked = false;
if (row.status === 'auditing') { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
selectionChange (selection) {
this.actUserRelationIdList = []
this.actUserRelationIdList = selection
},
//form
async loadTable () {
this.tableLoading = true
const url = '/heart/work/actuser/userlist'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/actuser/userlist'
let params = {
actId: this.actId
}
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
if (data.list && data.list.length > 0) {
data.list.forEach(item => {
//auditingpassedrefusedcanceled
if (item.status === 'auditing') {
item.statusShow = '待审核'
} else if (item.status === 'passed') {
item.statusShow = '已通过'
} else if (item.status === 'refused') {
item.statusShow = '已拒绝'
} else if (item.status === 'canceled') {
item.statusShow = '已取消'
} else {
item.statusShow = ''
}
});
this.tableData = [...data.list]
} else {
this.tableData = []
}
} else {
this.$message.error(msg)
}
},
handleReject () {
if (this.actUserRelationIdList.length === 0) {
this.$message({
type: "info",
message: "请选择人员"
});
return false
}
this.cancleShow = true
},
async handleAudit (type) {
if (this.actUserRelationIdList.length === 0) {
this.$message({
type: "info",
message: "请选择人员"
});
return false
}
if (type === 'refused' && !this.cancelReason) {
this.$message({
type: "info",
message: "请填写拒绝理由"
});
return false
}
this.auditList = []
this.actUserRelationIdList.forEach(item => {
let obj = {
type: type,
actUserRelationId: item.actUserRelationId,
rejectReason: this.cancelReason
}
this.auditList.push(obj)
});
const url = "/heart/work/actuser/audit-user"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/work/actuser/audit-user"
let params = [...this.auditList]
console.log(params)
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "操作成功"
});
this.cancelReason = ''
this.cancleShow = false
this.loadTable()
} else {
this.$message.error(msg)
}
},
cancleDiaClose () {
this.cancelReason = ''
this.cancleShow = false//
},
handleCancle () {
this.$emit('dialogCancle')
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return (this.clientHeight - 360)
},
...mapGetters(['clientHeight'])
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/buttonstyle.scss";
.item_width_1 {
width: 250px;
}
.item_width_2 {
width: 100px;
}
.div_table {
margin-top: 10px;
.table {
margin-top: 10px;
}
}
.div_btn {
margin-top: 10px;
display: flex;
justify-content: flex-end;
}
</style>

376
src/views/modules/communityParty/heart/heartFinish.vue

@ -0,0 +1,376 @@
<template>
<div class="dialog-h-content scroll-h">
<div>
<el-form ref="ref_form"
:inline="false"
:label-position="'left'"
:model="formData"
:rules="dataRule"
class="div_form mgl10">
<el-form-item label="实际活动时间"
label-width="150px"
style="display: block"
prop="actualStartTime">
<el-date-picker v-model="formData.actualStartTime"
class="list_item_width_3"
type="datetime"
value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.actualEndTime"
class="list_item_width_3 data-tag"
type="datetime"
value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="积分发放"
label-width="150px"
style="display: block"
prop="actualStartTime">
</el-form-item>
<div class="div_table">
<el-table class="m_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50">
</el-table-column>
<el-table-column prop="realName"
header-align="center"
align="center"
label="姓名"
width="120">
</el-table-column>
<el-table-column prop="nickName"
header-align="center"
align="center"
label="昵称"
width="120">
</el-table-column>
<el-table-column prop="signUpTime"
header-align="center"
align="center"
label="报名时间"
width="180">
</el-table-column>
<el-table-column prop="signInFlagShow"
header-align="center"
align="center"
label="是否签到"
width="100">
</el-table-column>
<el-table-column prop="grantPointShow"
header-align="center"
align="center"
label="操作"
min-width="200">
<template slot-scope="scope">
<el-radio v-model="scope.row.grantPointShow"
label="1">给分</el-radio>
<el-radio v-model="scope.row.grantPointShow"
label="2">不给分</el-radio>
</template>
</el-table-column>
<el-table-column prop="denyRewardReason"
header-align="center"
align="center"
label="理由"
min-width="320">
<template slot-scope="scope">
<el-input class="item_width_5"
placeholder="请输入理由"
v-model="scope.row.denyRewardReason">
</el-input>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button type="primary"
size="small"
@click="handleConfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
let loading //
export default {
data () {
return {
tableLoading: false,
actId: '',
tableData: [],
formData: {
actId: '',
actualStartTime: '',
actualEndTime: '',
}
}
},
components: {},
mounted () {
},
methods: {
async initTable (actId) {
this.actId = actId
this.formData.actId = actId
this.formData.actualStartTime = this.actStartTime
this.formData.actualEndTime = this.actEndTime
this.formData.reward = this.reward
await this.loadTable()
},
//form
async loadTable () {
this.tableLoading = true
const url = '/heart/work/actuser/userlist'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/actuser/userlist'
let params = {
actId: this.actId
}
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
let arr = []
if (data.list && data.list.length > 0) {
arr = data.list.filter(item => item.status === 'passed')
arr.forEach(item => {
if (item.signInFlag === 'signed_in') {
item.signInFlagShow = '是'
item.grantPointShow = '1'
item.grantPoint = true
item.denyRewardReason = ''
} else {
item.signInFlagShow = '否'
item.grantPointShow = '2'
item.grantPoint = false
item.denyRewardReason = '活动未签到'
}
});
this.tableData = [...arr]
} else {
this.tableData = []
}
} else {
this.$message.error(msg)
}
},
async handleConfirm () {
if (!this.formData.actualStartTime || !this.formData.actualEndTime) {
this.$message({
type: "info",
message: '请填写实际活动时间'
});
return false
}
let errBeforeSubmit = ''
if (
new Date(this.formData.actualEndTime).getTime() <=
new Date(this.formData.actualStartTime).getTime()
) {
errBeforeSubmit = "活动实际开始时间应早于活动实际结束时间";
}
if (errBeforeSubmit) {
this.$message({
type: 'info',
message: errBeforeSubmit
})
return false
}
let userList = []
let reqmsg = ''
// actUserRelationId grantPoint true:false denyRewardReason
this.tableData.forEach(item => {
let obj = {}
obj.actUserRelationId = item.actUserRelationId
obj.denyRewardReason = item.denyRewardReason
if (item.grantPointShow === '1') {
obj.grantPoint = true
} else {
obj.grantPoint = false
if (!item.denyRewardReason) {
reqmsg = '不给分的理由必填'
}
}
userList.push(obj)
});
if (reqmsg) {
this.$message({
type: "info",
message: reqmsg
});
return false
} else {
this.finishAct(userList)
}
},
async finishAct (userList) {
let url = "/heart/work/act/finish"
// let url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/finish"
let params = {
userList: userList,
...this.formData
}
console.log(params)
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: '操作成功'
});
this.$emit('finishDiaOk')
} else {
this.$message.error(msg)
}
},
handleCancle () {
this.$emit('finishDiaClose')
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
actualStartTime: [
{ required: true, message: '活动时间不能为空', trigger: 'blur' }
],
}
},
tableHeight () {
return (this.clientHeight - 440)
},
...mapGetters(['clientHeight'])
},
props: {
reward: {
type: Number,
default: undefined
},
actStartTime: {
type: String,
default: ''
},
actEndTime: {
type: String,
default: ''
},
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/form-main.scss";
.div_table {
display: flex;
justify-content: flex-start;
.m_table {
flex: 0 0 1200px;
// padding: 20px;
}
}
.div_form {
width: 90%;
margin-top: 20px;
}
.mgl10 {
margin-left: 20px;
}
</style>

1067
src/views/modules/communityParty/heart/heartForm.vue

File diff suppressed because it is too large

680
src/views/modules/communityParty/heart/heartList.vue

@ -0,0 +1,680 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'100px'">
<el-form-item label="活动标题"
prop="title">
<el-input v-model="formData.title"
size="small"
class="item_width_3"
clearable
placeholder="请输入活动标题">
</el-input>
</el-form-item>
<el-form-item label="活动时间"
prop="actStartTime">
<el-date-picker v-model="formData.actStartTime"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.actEndTime"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态"
prop="status">
<el-select class="item_width_3"
v-model="formData.status"
size="small"
placeholder="请选择"
clearable>
<el-option v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</el-form>
</div>
<div class="div_table">
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<el-table class="table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="title"
header-align="center"
align="center"
label="活动标题"
:show-overflow-tooltip="true"
min-width="180">
</el-table-column>
<el-table-column prop="actAddress"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="活动地址"
min-width="180">
</el-table-column>
<el-table-column prop="actStartTime"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="活动时间"
min-width="180">
<template slot-scope="scope">
<span>{{scope.row.actStartTime+'至'+scope.row.actEndTime}}</span>
</template>
</el-table-column>
<el-table-column prop="signUpEndTime"
header-align="center"
align="center"
:show-overflow-tooltip="true"
label="报名截止时间"
min-width="110">
</el-table-column>
<el-table-column prop="statusShow"
header-align="center"
align="center"
label="状态"
:show-overflow-tooltip="true"
min-width="100">
</el-table-column>
<el-table-column prop="richTextFlagShow"
header-align="center"
align="center"
label="来源"
:show-overflow-tooltip="true"
width="100">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="220"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="scope.row.isMyPublish&&(scope.row.status==='signing_up' || scope.row.status==='end_sign_up' || scope.row.status==='enough')&&scope.row.richTextFlag"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.isMyPublish&&(scope.row.status==='signing_up' || scope.row.status==='end_sign_up' || scope.row.status==='enough')&& scope.row.auditSwitch"
type="text"
class="div-table-button--edit"
size="small"
@click="handleAudit(scope.row)">报名审核</el-button>
<el-button v-if="scope.row.isMyPublish&&((scope.row.status==='in_progress' || scope.row.status==='finished')||!scope.row.auditSwitch)"
type="text"
class="div-table-button--edit"
size="small"
@click="handlePerson(scope.row)">查看人员</el-button>
<el-button v-if="scope.row.isMyPublish&&(scope.row.status==='signing_up' || scope.row.status==='end_sign_up' || scope.row.status==='enough')"
type="text"
class="div-table-button--delete"
size="small"
@click="handleCancleAct(scope.row)">取消活动</el-button>
<el-button v-if="scope.row.isMyPublish&&scope.row.status==='in_progress'"
type="text"
class="div-table-button--delete"
size="small"
@click="handleFinishAct(scope.row)">结束活动</el-button>
<el-button v-if="scope.row.isMyPublish&&(scope.row.status==='finished' && !scope.row.summaryFlag)"
type="text"
class="div-table-button--edit"
size="small"
@click="handleReview(scope.row)">添加回顾</el-button>
<!-- <el-popover popper-class="btn-popper"
placement="bottom"
style="margin-left:10px"
width="20"
trigger="click">
<div class="table-more-btn">
<el-button type="text"
class="div-table-button--edit"
size="small"
@click="handleReview(scope.row)">报名审核</el-button>
</div>
<div class="table-more-btn">
<el-button type="text"
class="div-table-button--delete"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</div>
<el-button type="text"
size="small"
class="div-table-button--more"
slot="reference">更多<i class="el-icon-caret-bottom"></i></el-button>
</el-popover> -->
</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="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="1350px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<heart-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></heart-form>
</el-dialog>
<!-- 活动取消原因 -->
<el-dialog :visible.sync="cancleShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'活动取消原因'"
width="550px"
top="5vh"
class="dialog-h"
@closed="cancleDiaClose">
<div style="padding:30px">
<el-input class="item_width_5"
type="textarea"
maxlength="100"
show-word-limit
:rows="4"
placeholder="请输入取消理由"
v-model="cancelReason"></el-input>
<div style="display:flex; justify-content: center;margin-top:20px">
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="cancleDiaClose">取消</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="cancleAct">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 报名审核弹出框 -->
<el-dialog :visible.sync="auditShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'报名审核'"
width="90%"
top="5vh"
class="dialog-h"
@closed="auditDiaClose">
<heart-audit ref="ref_audit"></heart-audit>
</el-dialog>
<!-- 查看人员弹出框 -->
<el-dialog :visible.sync="personShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'查看人员'"
width="90%"
top="5vh"
class="dialog-h"
@closed="personDiaClose">
<heart-person ref="ref_person"
@personDiaClose="personDiaClose"
:status="status"></heart-person>
</el-dialog>
<!-- 活动结束弹出框 -->
<el-dialog :visible.sync="finishShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'活动结束'"
width="1250px"
top="5vh"
class="dialog-h"
@closed="finishDiaClose">
<heart-finish ref="ref_finish"
:actStartTime="actStartTime"
:actEndTime="actEndTime"
:reward="reward"
@finishDiaClose="finishDiaClose"
@finishDiaOk="finishDiaOk"></heart-finish>
</el-dialog>
<!-- 活动回顾弹出框 -->
<el-dialog :visible.sync="reviewShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'活动回顾'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="reviewDiaClose">
<heart-review ref="ref_review"
@reviewDiaClose="reviewDiaClose"
@reviewDiaOk="reviewDiaOk"></heart-review>
</el-dialog>
</div>
</template>
<script>
import heartForm from './heartForm'
import heartAudit from './heartAudit'
import heartPerson from './heartPerson'
import heartFinish from './heartFinish'
import heartReview from './heartReview'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.formData.actactStartTime) {
let actStartTime = new Date(this.formData.actactStartTime + ':00')
return time.getTime() < actStartTime || time.getTime() === actStartTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
loading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: false,
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
agencyId: '',
statusList: [
{
value: 'published',
label: '进行中'
},
{
value: 'finished',
label: '已结束'
},
{
value: 'canceled',
label: '已取消'
}
],//list
formData: {
title: '',//
actStartTime: '',
actEndTime: '',
status: ''
},
tableData: [],
//form
formShow: false,
formTitle: '新增爱心互助',
actId: '',
actStartTime: '',
actEndTime: '',
reward: null,
status: '',
cancelReason: '',
cancleShow: false,//
auditShow: false,//
personShow: false,//
finishShow: false,//
reviewShow: false,//
}
},
components: {
heartForm, heartAudit, heartPerson, heartFinish, heartReview
},
async created () {
},
async mounted () {
this.customerId = localStorage.getItem('customerId')
const { user } = this.$store.state
this.agencyId = user.agencyId
await this.loadTable()
},
methods: {
handleSearch () {
this.loadTable()
},
async loadTable () {
this.tableLoading = true
const url = "/heart/work/act/pagelist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/pagelist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
...this.formData
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
if (this.tableData && this.tableData.length > 0) {
this.tableData.forEach(element => {
if (element.richTextFlag) {
element.richTextFlagShow = '管理平台'
} else {
element.richTextFlagShow = '小程序'
}
//signing_up: end_sign_up; in_progress; enoughcanceled; finished
if (element.status === 'signing_up') {
element.statusShow = '报名中'
} else if (element.status === 'end_sign_up') {
element.statusShow = '截止报名'
} else if (element.status === 'in_progress') {
element.statusShow = '已开始'
} else if (element.status === 'enough') {
element.statusShow = '已报满'
} else if (element.status === 'canceled') {
element.statusShow = '已取消'
} else if (element.status === 'finished') {
element.statusShow = '已结束'
} else {
element.statusShow = ''
}
});
}
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
reviewDiaClose () {
this.reviewShow = false
},
handleDetail (row) {
this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.actId)
})
},
handleAdd () {
this.formTitle = '新增'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null)
})
},
handleEdit (row) {
this.formTitle = '编辑'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row.actId)
})
},
handleAudit (row) {
this.auditShow = true
this.$nextTick(() => {
this.$refs.ref_audit.initTable(row.actId)
})
},
handlePerson (row) {
this.status = row.status
this.personShow = true
this.$nextTick(() => {
this.$refs.ref_person.initTable(row.actId)
})
},
handleReview (row) {
this.reviewShow = true
this.$nextTick(() => {
this.$refs.ref_review.initForm(row.actId)
})
},
handleFinishAct (row) {
this.finishShow = true
this.actStartTime = row.actStartTime
this.actEndTime = row.actEndTime
this.reward = row.reward
this.$nextTick(() => {
this.$refs.ref_finish.initTable(row.actId)
})
},
addFormCancle () {
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
},
async handleCancleAct (row) {
this.cancleShow = true
this.actId = row.actId
},
async cancleAct () {
const url = "/heart/work/act/cancelact"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/del"
let params = {
actId: this.actId,
cancelReason: this.cancelReason,
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.cancleShow = false
this.$message({
type: "success",
message: "取消成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
auditDiaClose () {
this.auditShow = false//
},
personDiaClose () {
this.personShow = false//
},
personDiaClose () {
this.personShow = false//
},
finishDiaClose () {
this.finishShow = false//
},
finishDiaOk () {
this.finishShow = false//
this.loadTable()
},
reviewDiaOk () {
this.reviewShow = false//
this.loadTable()
},
cancleDiaClose () {
this.cancelReason = ''
this.cancleShow = false//
},
//
resetSearch () {
this.formData = {
title: '',//
actStartTime: '',
actEndTime: '',
status: ''
}
this.pageSize = 20
this.pageNo = 0
this.loadTable()
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 340 + this.iframeHeight : this.clientHeight - 340
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/list-main.scss";
</style>

291
src/views/modules/communityParty/heart/heartPerson.vue

@ -0,0 +1,291 @@
<template>
<div class="dialog-h-content scroll-h">
<div class="div_table">
<el-table class="table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50">
</el-table-column>
<el-table-column prop="realName"
header-align="center"
align="center"
label="姓名"
:show-overflow-tooltip="true"
min-width="100">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
label="手机"
width="120">
</el-table-column>
<el-table-column prop="idNum"
header-align="center"
align="center"
label="身份证"
width="180">
</el-table-column>
<el-table-column prop="nickName"
header-align="center"
align="center"
label="昵称"
:show-overflow-tooltip="true"
min-width="100">
</el-table-column>
<el-table-column prop="signUpActNum"
header-align="center"
align="center"
label="报名活动个数"
width="120">
</el-table-column>
<el-table-column prop="signInActNum"
header-align="center"
align="center"
label="实际参加活动个数"
width="140">
</el-table-column>
<el-table-column prop="obtainPointsActNum"
header-align="center"
align="center"
label="获得积分活动个数"
width="140">
</el-table-column>
<el-table-column prop="signUpTime"
header-align="center"
align="center"
label="报名时间"
width="180">
</el-table-column>
<el-table-column v-if="status==='finished'"
prop="signInFlagShow"
header-align="center"
align="center"
label="是否签到"
width="90">
</el-table-column>
<el-table-column v-if="status==='finished'"
prop="rewardFlagShow"
header-align="center"
align="center"
label="是否给分"
width="90">
</el-table-column>
<el-table-column prop="statusShow"
header-align="center"
align="center"
label="状态"
width="90">
</el-table-column>
</el-table>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
let loading //
export default {
data () {
return {
tableLoading: false,
actId: '',
tableData: [],
actUserRelationIdList: [],
cancelReason: '',
cancleShow: false,//
}
},
components: {},
mounted () {
},
methods: {
async initTable (actId) {
this.actId = actId
await this.loadTable()
},
checkSelect (row, index) {
//auditingpassedrefusedcanceled
let isChecked = false;
if (row.status === 'auditing') { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
selectionChange (selection) {
this.actUserRelationIdList = []
this.actUserRelationIdList = selection
},
//form
async loadTable () {
this.tableLoading = true
const url = '/heart/work/actuser/userlist'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/actuser/userlist'
let params = {
actId: this.actId
}
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
if (data.list && data.list.length > 0) {
data.list.forEach(item => {
//auditingpassedrefusedcanceled
if (item.status === 'auditing') {
item.statusShow = '待审核'
} else if (item.status === 'passed') {
item.statusShow = '已通过'
} else if (item.status === 'refused') {
item.statusShow = '已拒绝'
} else if (item.status === 'canceled') {
item.statusShow = '已取消'
} else {
item.statusShow = ''
}
if (item.rewardFlag === 'agree') {
item.rewardFlagShow = '已发放'
} else {
item.rewardFlagShow = '未发放'
}
if (item.signInFlag === 'signed_in') {
item.signInFlagShow = '是'
} else {
item.signInFlagShow = '否'
}
});
this.tableData = [...data.list]
} else {
this.tableData = []
}
} else {
this.$message.error(msg)
}
},
handleReject () {
// if (this.actUserRelationIdList.length === 0) {
// this.$message({
// type: "info",
// message: ""
// });
// return false
// }
this.cancleShow = true
},
handleCancle () {
this.$emit('personDiaClose')
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return (this.clientHeight - 360)
},
...mapGetters(['clientHeight'])
},
props: {
status: {
type: String,
default: ''
},
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/buttonstyle.scss";
.item_width_1 {
width: 250px;
}
.item_width_2 {
width: 100px;
}
.div_table {
margin-top: 10px;
.table {
margin-top: 10px;
}
}
.div_btn {
margin-top: 10px;
display: flex;
justify-content: center;
}
</style>

214
src/views/modules/communityParty/heart/heartReview.vue

@ -0,0 +1,214 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div class="div_tinymce">
<Tinymce class="tinymce_view"
v-model="actContent"
:height="450"
style="width:1000px"
:customerId="customerId"
placeholder="在这里输入文字" />
</div>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import Tinymce from '@c/tinymce2/index.vue'
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
customerId: '',
actId: '',
actSummary: [],
actContent: '',
}
},
components: { Tinymce },
mounted () {
this.customerId = localStorage.getItem('customerId')
},
methods: {
async initForm (actId) {
this.startLoading()
if (actId) {
this.actId = actId
}
this.endLoading()
},
async handleComfirm () {
if (!this.actContent) {
this.$message({
type: 'info',
message: '活动回顾不能为空'
})
return false
}
this.actSummary = [{
contentType: 'rich_text',
content: this.dormatHtml(this.actContent)
}]
let url = "/heart/work/act/summaryact"
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add"
let params = {
actId: this.actId,
actSummary: this.actSummary
}
console.log(params)
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.actContent = ''
this.$emit('reviewDiaOk')
} else {
this.$message.error(msg)
}
},
dormatHtml (content) {
let c = ''
if (content.indexOf('DOCTYPE') != -1) {
c = content.slice(45, -16);
}
console.log('content', typeof content)
return c || content
},
handleCancle () {
this.$emit('reviewDiaClose')
},
resetData () {
this.formData = {
actContent: '',
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
gridId: [
{ required: true, message: '场所网格不能为空', trigger: 'blur' }
],
ninePlaceVal: [
{ required: true, message: '场所类型不能为空', trigger: 'blur' },
],
placeOrgId: [
{ required: true, message: '场所名称不能为空', trigger: 'blur' }
],
placePatrolTeamId: [
{ required: true, message: '分队不能为空', trigger: 'blur' }
],
inspectorArray: [
{ required: true, message: '巡检人员不能为空', trigger: 'blur' }
],
firstTime: [
{ required: true, message: '首次巡查时间不能为空', trigger: 'blur' }
],
detailed: [
{ required: true, message: '隐患明细不能为空', trigger: 'blur' }
],
firstResult: [
{ required: true, message: '首次巡查结果不能为空', trigger: 'blur' }
]
}
},
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/form-main.scss";
.div_tinymce {
display: flex;
justify-content: center;
}
.avatar-uploader {
margin: 0 0 0 20px;
}
</style>
<style lang="scss">
.el-dialog__body {
padding: 0 10px 20px !important;
}
.hide {
.el-upload--picture-card {
display: none !important;
}
}
</style>

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

@ -12,14 +12,27 @@
>
<div class="list">
<el-form-item
v-for="item in editParams1"
label-width="150px"
v-for="item in editParams"
class="item"
label-width="140px"
style="display: block"
:key="'edit' + item.keyName"
:label="item.field"
:prop="item.keyName"
:rules="item.rules || []"
>
<template v-if="item.type == 'switch'">
<el-switch
v-model="fmData[item.keyName]"
size="small"
:active-text="item.activeText || ''"
:inactive-text="item.inactiveText || ''"
:active-value="item.activeValue || true"
:inactive-value="item.inactiveValue || false"
>
</el-switch>
</template>
<template v-if="item.type == 'input'">
<el-input
v-if="
@ -62,6 +75,27 @@
</div>
</template>
<template v-if="item.type == 'date'">
<el-date-picker
v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
:picker-options="item.pickerOptions"
class="item-input"
size="small"
clearable
show-word-limit
:value-format="item.format || 'yyyy-MM-dd'"
:placeholder="item.placeholder || '请输入'"
>
</el-date-picker>
<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]"
@ -85,143 +119,110 @@
size="small"
clearable
class="item-select"
:multiple="item.multiple || false"
:filterable="item.filterable || false"
:allowCreate="item.allowCreate || false"
:collapse-tags="item.collapseTags || false"
default-first-option
@change="(e) => handleChangeSelect(e, item)"
>
<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
class="address-item-input"
:placeholder="item.placeholder || '请输入所在地址'"
v-model="fmData[item.keyName]"
:maxlength="item.maxlength || ''"
show-word-limit
>
</el-input>
<el-button
style="margin-left: 10px"
type="default"
size="small"
ref="mapSearch"
@click="handleSearchMap(item)"
>查询</el-button
>
<div id="app" class="div_map"></div>
<div style="margin-top: 10px" v-show="false">
<span>经度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入经度"
v-model="fmData[item.supKeys[0]]"
<template v-if="item.optionType == 'group'">
<el-option-group
v-for="group in item.optionList"
:key="group.label"
:label="group.label"
>
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入纬度"
v-model="fmData[item.supKeys[1]]"
<el-option
v-for="subItem in group.optionList"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
>
</el-option>
</el-option-group>
</template>
<template v-else>
<el-option
v-for="(subItem, subIndex) in item.optionList"
:key="subItem.value + subIndex"
:label="subItem.label"
:value="subItem.value"
>
</el-input>
</div>
</div>
</el-option>
</template>
</el-select>
</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
<template v-else-if="item.type == 'rich-text'">
<div
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 || '请输入'"
class="item-rich-text"
>
</el-input>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
<Tinymce
:ref="'richText' + item.keyName"
v-model="fmData[item.keyName]"
:customerId="customerId"
:placeholder="item.placeholder || '请输入'"
:height="500"
/>
</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 || '请输入'"
<div
v-else
class="item-rich-text z-show"
@click="handleClickHtmlNode"
>
</el-input>
<div class="item-show" v-else>
{{ fmData[item.keyName] || "--" }}
<div v-html="fmData[item.keyName]"></div>
</div>
</template>
<template v-if="item.type == 'number'">
<el-input-number
<template v-else-if="item.type == 'cascader'">
<el-cascader
v-model="fmData[item.keyName]"
class="item-number"
:placeholder="item.placeholder || '请选择'"
:options="item.optionList"
:props="item.optionProps || {}"
:show-all-levels="false"
:collapse-tags="item.collapseTags || false"
size="small"
clearable
:precision="item.precision || 0"
:step="item.step || 1"
:min="item.min || 0"
:max="item.max || 999999999999"
:placeholder="item.placeholder || '请输入'"
class="item-select"
@change="(e) => handleChangeCascader(e, item)"
>
</el-input-number>
<span v-if="item.unitName">{{ item.unitName }}</span>
</el-cascader>
</template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
class="item-select"
<template v-else-if="item.type == 'upload'">
<el-upload
v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
ref="upload"
class="avatar-uploader"
:class="{ 'z-full': fmData[item.keyName].length >= item.limit }"
:action="item.uploadUrl || uploadUrl"
:data="{ customerId: customerId }"
:show-file-list="true"
:list-type="item.listType || 'picture'"
:limit="item.limit || 100"
:file-list="fmData[item.keyName]"
:on-success="(res, file) => handleImgSuccess(res, file, item)"
:on-error="(res, file) => handleImgError(res, file, item)"
:on-remove="(res) => handleImgRemove(res, item)"
:on-exceed="(res) => handleImgExceed(res, item)"
:before-upload="(file) => beforeImgUpload(file, item)"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
>
</el-option>
</el-select>
<a><i class="el-icon-plus"></i> 点击上传</a>
</el-upload>
<el-image
v-else-if="fmData[item.keyName].length > 0"
style="width: 100px; height: 100px"
:src="fmData[item.keyName][0].url"
fit="cover"
:preview-src-list="fmData[item.keyName].map((item) => item.url)"
></el-image>
<span v-else>--</span>
</template>
<template v-else-if="item.type == 'address'">
@ -232,12 +233,14 @@
v-model="fmData[item.keyName]"
:maxlength="item.maxlength || ''"
show-word-limit
size="small"
>
</el-input>
<el-button
style="margin-left: 10px"
type="default"
size="small"
ref="mapSearch"
@click="handleSearchMap(item)"
>查询</el-button
>
@ -267,18 +270,27 @@
</el-form>
<div class="div_btn resi-btns" v-if="!formBtnFixed">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" @click="handleCancle">{{
editConfig.cancelBtnName || "取消"
}}</el-button>
<el-button
v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>{{ editConfig.confirmBtnName || "确定" }}</el-button
>
<slot
name="operateSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
</div>
<slot
name="bottomSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
@ -286,15 +298,23 @@
</div>
<div class="div_btn resi-btns" v-if="formBtnFixed">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" @click="handleCancle">{{
editConfig.cancelBtnName || "取消"
}}</el-button>
<el-button
v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>{{ editConfig.confirmBtnName || "确定" }}</el-button
>
<slot
name="operateSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
</div>
</div>
</template>
@ -303,6 +323,7 @@
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import Schema from "async-validator";
import Tinymce from "@c/tinymce2/index.vue";
var map;
var search;
@ -311,6 +332,8 @@ var infoWindowList;
var geocoder; //
export default {
components: { Tinymce },
props: {
formId: {
type: String,
@ -361,6 +384,10 @@ export default {
type: Object,
default: () => ({}),
},
editConfig: {
type: Object,
default: () => ({}),
},
},
data() {
@ -373,9 +400,11 @@ export default {
editParams1: [],
editParams2: [],
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
customerId: localStorage.getItem("customerId"),
};
},
components: {},
computed: {},
watch: {
editParams: {
@ -406,19 +435,53 @@ export default {
iniFmData() {
const { editParams, fmData, editParamsDiv } = this;
editParams.forEach((item, index) => {
fmData[item.keyName] = item.value || "";
if (typeof item.value == "function") {
fmData[item.keyName] = item.value();
} else if (
typeof item.value == "string" ||
typeof item.value == "number" ||
typeof item.value == "boolean"
) {
fmData[item.keyName] = item.value;
} else if (typeof item.value == "undefined") {
fmData[item.keyName] = "";
} else {
fmData[item.keyName] = item.value || "";
console.error(
"不应该直接传入数组或对象的值,这样会导致传入的值被子组件修改。editParams-------------cpts/base/cpts/edit.vue",
item
);
}
if (item.supValues) {
item.supValues.forEach((value, index) => {
fmData[item.supKeys[index]] = value;
if (typeof value == "function") {
fmData[item.supKeys[index]] = value();
} else if (
typeof value == "string" ||
typeof value == "number" ||
typeof value == "boolean"
) {
fmData[item.supKeys[index]] = value;
} else if (typeof value == "undefined") {
fmData[item.supKeys[index]] = "";
} else {
fmData[item.supKeys[index]] = value;
console.error(
"不应该直接传入数组或对象的值,这样会导致传入的值被子组件修改。editParams-------------cpts/base/cpts/edit.vue",
item
);
}
});
}
if (item.type == "select") {
if (item.type == "select" || item.type == "cascader") {
if (item.optionUrl) {
this.getFmOptions(
index,
item.optionUrl,
item.optionUrlParams || {}
item.optionUrlParams || {},
item.optionCook || null
);
}
} else if (item.type == "address") {
@ -440,18 +503,119 @@ export default {
this.iniLoaded = true;
},
async getFmOptions(index, url, params) {
handleClickHtmlNode(e) {
//
if (e.target.localName.toLowerCase() === "a") {
//
let url = e.target.getAttribute("src"); //adata-ididclickaclick
window.open(url);
}
},
async getFmOptions(index, url, params, cookFn) {
const { data, code, msg } = await requestPost(url, {
...params,
});
if (code === 0) {
this.editParams[index].optionList = data || [];
this.editParams[index].optionList =
typeof cookFn == "function" ? cookFn(data) : data || [];
} else {
this.$message.error("请求检索基础数据失败!");
}
},
handleChangeCascader(vals, item) {
this.fmData[item["keyName"]] = vals;
if (typeof item.handleChangeFn == "function") {
item.handleChangeFn(vals, item, this);
}
},
handleChangeSelect(vals, item) {
console.log(vals, item);
this.fmData[item["keyName"]] = vals;
if (typeof item.handleChangeFn == "function") {
item.handleChangeFn(vals, item, this);
}
},
beforeImgUpload(file, item) {
if (typeof item.beforeImgUpload == "function") {
if (!item.beforeImgUpload(file, item, this)) return false;
}
return true;
},
handleImgRemove(file, item) {
console.log("handleImgRemove", file);
let url = file.response ? file.response.data.url : file.url;
if (url) {
let { fmData } = this;
this.fmData[item.keyName] = fmData[item.keyName].filter(
(item) => item.url !== url
);
if (item.supKeys && Array.isArray(item.supKeys)) {
if (item.supKeys.length > 0) {
this.fmData[item.supKeys[0]] = fmData[item.keyName].map(
(item) => item.url
);
}
if (item.supKeys.length > 1) {
this.fmData[item.supKeys[1]] =
this.fmData[item.supKeys[0]][0] || "";
}
}
}
},
handleImgExceed(res, item) {
console.log(res);
// this.$message({
// type: "warning",
// message: "",
// });
},
handleImgSuccess(res, file, item) {
console.log("handleImgSuccess", res);
if (res.code === 0 && res.msg === "success") {
let { fmData } = this;
// let picItem = {
// url: res.data.url,
// name: file.name,
// size: file.size,
// type: file.type,
// format: file.name.split(".").pop(),
// };
let picItem = file;
picItem.url = res.data.url;
picItem.format = file.name.split(".").pop();
if (Array.isArray(this.fmData[item.keyName])) {
this.fmData[item.keyName].push(picItem);
} else {
this.fmData[item.keyName] = [picItem];
}
if (item.supKeys && Array.isArray(item.supKeys)) {
if (item.supKeys.length > 0) {
this.fmData[item.supKeys[0]] = fmData[item.keyName].map(
(item) => item.url
);
}
if (item.supKeys.length > 1) {
this.fmData[item.supKeys[1]] =
this.fmData[item.supKeys[0]][0] || "";
}
}
} else {
this.$message.error(res.msg);
}
},
handleImgError(res, file, item) {
console.log(res);
},
// init
initMap(item) {
let { latitude, longitude } = this.$store.state.user;
@ -564,8 +728,13 @@ export default {
[idName]: formId,
};
const { data, code, msg } = await requestPost(url, params);
let { data, code, msg } = await requestPost(url, params);
if (code === 0) {
const { editConfig } = this;
console.log("xxxxxxxxxxxxxxxxxxxxxx", editConfig);
if (editConfig && typeof editConfig.cookInfoFn == "function") {
data = editConfig.cookInfoFn(data);
}
this.fmData = {
...this.fmData,
...data,
@ -590,6 +759,28 @@ export default {
window.open(src);
},
//
dormatHtml(content) {
if (
content.startsWith(
"<!DOCTYPE html>\n<html>\n<head>\n</head>\n<body>\n"
) &&
content.endsWith("\n</body>\n</html>")
) {
content = content.slice(45, -16);
}
return content;
},
cookBeforeSubmit(data) {
Object.keys(data).forEach((k) => {
if (typeof data[k] == "string") {
data[k] = this.dormatHtml(data[k]);
}
});
return data;
},
async handleComfirm() {
this.btnDisable = true;
setTimeout(() => {
@ -623,13 +814,23 @@ export default {
},
async submit() {
const { editConfig, fmData, formType, editFixedParams } = this;
if (
typeof editConfig.beforeSubmit == "function" &&
!editConfig.beforeSubmit(formType, fmData, this)
) {
return;
}
let url = "";
let params = {
...this.fmData,
...this.editFixedParams,
...fmData,
...editFixedParams,
// serviceType: this.fmData.serviceTypeArr.join(","),
};
params = this.cookBeforeSubmit(params);
if (this.formType === "add") {
url = this.addUrl;
} else {
@ -643,6 +844,7 @@ export default {
type: "success",
message: "操作成功",
});
this.handleCancle();
this.$emit("afterEdit");
this.btnDisable = false;
} else {
@ -663,23 +865,50 @@ export default {
margin-top: 30px;
&.z-div {
display: flex;
.list {
display: flex;
flex-wrap: wrap;
.item {
min-width: 45%;
.item-rich-text {
width: 817px;
max-height: 500px;
overflow: auto;
img {
max-width: 100%;
}
&.z-show {
box-sizing: border-box;
padding: 15px;
border: 1px solid #eee;
height: auto;
}
}
}
}
.item-show {
width: 324px;
}
.item-input {
width: 225px;
width: 324px;
}
.item-select {
width: 225px;
width: 324px;
}
.item-number {
width: 125px;
width: 180px;
}
.address-item {
width: 450px;
width: 350px;
.address-item-input {
width: 85%;
width: 74%;
}
.address-item-input2 {
margin-left: 5px;
@ -687,12 +916,44 @@ export default {
}
}
}
.avatar-uploader {
&.z-full {
/deep/ .el-upload.el-upload--picture-card {
display: none !important;
}
}
a {
display: flex;
align-items: center;
justify-content: center;
color: #65a5f9;
i {
margin-right: 4px;
color: #65a5f9;
font-size: 18px;
}
&:hover {
text-decoration: none;
}
}
}
.item-rich-text {
width: 600px;
height: 500px;
img {
max-width: 100%;
}
.item-show {
width: 100%;
}
}
.item-select,
.item-show,
.item-input {
width: 450px;
}
.item-select {
width: 225px;
}
.item-number {
width: 225px;
}

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

@ -13,7 +13,7 @@
<template v-if="item.type == 'input'">
<el-input
v-model="item.value"
class="item_width_1"
style="width: 240px"
size="small"
clearable
:placeholder="item.placeholder || '请输入'"
@ -26,7 +26,8 @@
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
class="item_width_2"
style="width: 240px"
:multiple="item.multiple || false"
>
<el-option
v-for="item in item.optionList"
@ -37,6 +38,41 @@
</el-option>
</el-select>
</template>
<template v-else-if="item.type == 'cascader'">
<el-cascader
v-model="item.value"
:placeholder="item.placeholder || '请选择'"
:options="item.optionList"
:props="item.optionProps"
:show-all-levels="false"
size="small"
clearable
style="width: 240px"
@change="(e) => handleChangeCascader(e, item)"
>
</el-cascader>
</template>
<template v-if="item.type == 'date-range'">
<el-date-picker
v-model="item.supValues[0]"
type="date"
placeholder="开始时间"
style="width: 150px"
value-format="yyyy-MM-dd"
clearable
>
</el-date-picker>
<span style="display: inline-block; margin: 0 10px"></span>
<el-date-picker
v-model="item.supValues[1]"
type="date"
placeholder="结束时间"
style="width: 150px"
value-format="yyyy-MM-dd"
clearable
>
</el-date-picker>
</template>
</el-form-item>
<el-button
@ -57,7 +93,7 @@
</el-form>
</div>
<div class="div_table">
<div class="div_table" :style="{ height: maxTableHeight + 130 + 'px' }">
<div class="div_btn">
<el-button
class="diy-button--add"
@ -103,6 +139,7 @@
</div>
<el-table
ref="ref_table"
:data="tableData"
border
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
@ -131,6 +168,20 @@
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
v-else-if="item.type == 'array'"
:key="'table-array' + item.keyName"
:prop="item.keyName"
:label="item.field"
align="center"
:width="item.width || ''"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
{{ scope.row[item.keyName].join(item.arrayDiv || ",") }}
</template>
</el-table-column>
</template>
<el-table-column
@ -141,6 +192,7 @@
>
<template slot-scope="scope">
<el-button
v-if="infoUrl && infoAuth(scope.row)"
@click="handleWatch(scope.row)"
type="text"
size="small"
@ -170,6 +222,8 @@
>删除</el-button
>
</el-popconfirm>
<slot name="listBtnSup" v-bind:item="scope.row"></slot>
</template>
</el-table-column>
</el-table>
@ -202,7 +256,8 @@
@closed="handleClose"
>
<edit-form
ref="eleEditForm"
v-if="formShow"
ref="editForm"
:idName="idName"
:formId="formId"
:formType="formType"
@ -214,12 +269,21 @@
:editElseRules="editElseRules"
:editFixedParams="editFixedParams"
:formBtnFixed="formBtnFixed"
:editConfig="editConfig"
@close="handleClose"
@afterEdit="handleEditSuccess"
>
<template v-slot="{ id, formType, info }">
<template v-slot:bottomSup="{ id, formType, info }">
<slot
name="editElse"
name="editBottomSup"
v-bind:id="id"
v-bind:formType="formType"
v-bind:info="info"
></slot>
</template>
<template v-slot:operateSup="{ id, formType, info }">
<slot
name="editOperateSup"
v-bind:id="id"
v-bind:formType="formType"
v-bind:info="info"
@ -289,13 +353,17 @@ export default {
default: "",
},
infoAuth: {
type: Function,
default: () => true,
},
editAuth: {
type: Function,
default: () => true,
},
editBtnName: {
type: Function,
default: () => "编辑",
default: () => "修改",
},
delAuth: {
type: Function,
@ -310,6 +378,10 @@ export default {
type: Object,
default: () => ({}),
},
editConfig: {
type: Object,
default: () => ({}),
},
editFixedParams: {
type: Object,
default: () => ({}),
@ -351,8 +423,8 @@ export default {
maxTableHeight() {
const { ref_search_height } = this;
return this.$store.state.inIframe
? this.clientHeight - ref_search_height - 260 + this.iframeHeight
: this.clientHeight - ref_search_height - 260;
? this.clientHeight - ref_search_height - 265 + this.iframeHeight
: this.clientHeight - ref_search_height - 265;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
@ -372,6 +444,12 @@ export default {
await nextTick(100);
this.computeSearchHeight();
},
activated() {
console.log("-------------activated");
this.$refs["ref_table"].doLayout();
},
methods: {
computeSearchHeight() {
this.ref_search_height = this.$refs["ref_search"].clientHeight;
@ -382,30 +460,38 @@ export default {
iniSearchData() {
const { searchParams } = this;
searchParams.forEach((item, index) => {
if (item.type == "select") {
if (item.type == "select" || item.type == "cascader") {
if (item.optionUrl) {
this.getFmOptions(
index,
item.optionUrl,
item.optionUrlParams || {}
item.optionUrlParams || {},
item.optionCook || null
);
}
}
});
},
async getFmOptions(index, url, params) {
async getFmOptions(index, url, params, cookFn) {
const { data, code, msg } = await requestPost(url, {
...params,
});
if (code === 0) {
this.searchParams[index].optionList = data || [];
this.searchParams[index].optionList =
typeof cookFn == "function" ? cookFn(data) : data || [];
} else {
this.$message.error("请求检索基础数据失败!");
}
},
handleChangeCascader(vals, item) {
if (typeof item.handleChangeFn == "function") {
item.handleChangeFn(vals, item);
}
},
handleSearch(val) {
this.pageNo = 1;
@ -429,6 +515,7 @@ export default {
}
return fileType && isLt1M;
},
async uploadHttpRequest(file) {
let { importUrl: url } = this;
if (!url) return;
@ -592,12 +679,21 @@ export default {
let fmData = {};
this.searchParams.forEach((item) => {
fmData[item.keyName] = item.value;
if (item.supValues) {
item.supValues.forEach((value, index) => {
fmData[item.supKeys[index]] = value;
});
}
});
return fmData;
},
refresh() {
this.getTableData();
},
async getTableData() {
const { tableUrl: url, searchParams } = this;
const { tableUrl: url } = this;
if (!url) return;
const { pageSize, pageNo } = this;
@ -630,8 +726,23 @@ export default {
},
resetSearch() {
console.log("----------------resetSearch", this.searchParams);
this.searchParams.forEach((item) => {
item.value = "";
if (typeof item.value == "string") {
item.value = "";
} else if (Array.isArray(item.value)) {
item.value = [];
}
if (item.supValues) {
item.supValues = item.supValues.map((value, index) => {
if (typeof value == "string") {
return "";
} else if (Array.isArray(value)) {
return [];
}
return value;
});
}
});
},
},

9
src/views/modules/plugins/change/resideath.vue

@ -442,7 +442,14 @@ export default {
userId: this.rowData.icResiUserId,
joinReason: this.blacklistReason,
welfareFlag: this.welfareFlag,
deathDate: this.deathDate
deathDate: this.deathDate
}
if (this.deathDate === '') {
this.$message({
message: '请选择死亡日期',
type:'warning'
})
return false
}
this.$http.post('/epmetuser/rentDeath/save', params).then(({ data: res }) => {
if (res.code !== 0) {

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

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

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

@ -0,0 +1,464 @@
<template>
<div style="overflow: auto; padding: 20px;max-height: 82vh;" class="form-class">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"
>
<el-form-item label="所属组织名称" prop="orgId">
<el-select
v-model="dataForm.orgId"
placeholder="所属组织名称"
@change="orgChangeHandle"
:disabled="dialogTitle == '查看'"
>
<el-option
ref="org"
v-for="item in organizationList"
:key="item.orgId"
:label="item.orgName"
:value="item.orgId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="核酸检测点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item label="服务时间" prop="serveTime">
<el-input
v-model="dataForm.serveTime"
type="textarea"
:rows="2"
placeholder="请输入服务时间,如:每日开放 上午:8:00-11:30 ;下午:13:00-17:00"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
:change="check_num()"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item label="检测点地址" prop="address">
<el-input
v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width:65%;"
></el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
>
</el-form-item>
<el-form-item
label="位置坐标"
prop="longitude"
style="display: block"
class="position_label"
>
<div>
<!-- <el-input
class="item_width_4"
maxlength="50"
placeholder="例:青岛市时代国际广场"
v-model="keyWords"
style="width: 200px"
:disabled='dialogTitle == "查看"'
>
</el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
> -->
<div
id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"
></div>
<div style="margin-top: 10px" v-show="false">
<span>经度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
</div>
</div>
</el-form-item>
</el-form>
<div class="submit">
<el-button @click="closeSubmit">{{ $t("cancel") }}</el-button>
<el-button
v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()"
>{{ $t("confirm") }}</el-button
>
</div>
</div>
</template>
<script>
import debounce from "lodash/debounce";
var map;
var search;
var markers;
var geocoder;
var infoWindowList;
export default {
data() {
return {
dataForm: {
id: "",
customerId: "",
orgId: "",
orgName: "",
pid: "",
pids: "",
name: "",
serveTime: "",
mobile: "",
address: "",
longitude: '',
latitude: '',
},
keyWords: null,
organizationList: [],
};
},
computed: {
dataRule() {
return {
customerId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
orgId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
orgName: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
name: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
serveTime: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
mobile: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
address: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
longitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
latitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getFormInfo();
},
props: {
dialogTitle: {
type: String,
default: "",
},
},
methods: {
closeSubmit() {
this.$emit("closeDialog");
},
orgChangeHandle(val) {
for (var i = 0; i < this.organizationList.length; i++) {
if (this.organizationList[i].orgId === val) {
this.dataForm.orgName = this.organizationList[i].orgName;
return false;
}
}
},
// init
initMap() {
let { latitude, longitude } = this.$store.state.user;
//
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
console.log(latitude,longitude);
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45, //
});
search = new window.TMap.service.Search({ pageSize: 10 });
//
markers = new TMap.MultiMarker({
map: map,
geometries: [],
});
infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); //
//
map.on("panend", () => {
this.handleMoveCenter();
});
// this.handleMoveCenter()
this.convert();
},
handleMoveCenter() {
//
const center = map.getCenter();
const lat = center.getLat();
const lng = center.getLng();
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.setMarker(lat, lng);
this.convert(lat, lng);
},
//
handleSearchMap() {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
infoWindowList.length = 0;
markers.setGeometries([]);
//
search
.searchRectangle({
keyword: this.dataForm.address,
bounds: map.getBounds(),
})
.then((result) => {
let { data } = result;
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng },
} = data[0];
map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng);
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.convert();
} else {
this.$message.error("未检索到相关位置坐标");
}
});
},
convert(lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location;
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(
this.dataForm.latitude,
this.dataForm.longitude
);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: "main", //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
//
console.log(this.dataForm.address);
});
},
setMarker(lat, lng) {
markers.setGeometries([]);
markers.add([
{
id: "4",
styleId: "marker",
position: new TMap.LatLng(lat, lng),
properties: {
title: "marker4",
},
},
]);
},
//
getFormInfo() {
this.$http
.post(`/gov/org/agency/communityListByCustomerId`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.organizationList = res.data;
})
.catch(() => {});
},
init() {
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.initMap();
}
});
},
//
getInfo() {
this.$http
.get(`/epmetuser/icPointNucleicMonitoring/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
this.initMap();
})
.catch(() => {});
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](
"/epmetuser/icPointNucleicMonitoring/",
this.dataForm
)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.$emit("refreshDataList");
this.closeSubmit();
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
//
check_num: function () {
this.dataForm.mobile = this.dataForm.mobile.replace(
/[^\a-\z\A-\Z0-9]/g,
""
);
},
},
};
</script>
<style scoped>
.position_label >>> .el-form-item__label::before {
color: #fff !important;
}
.submit {
text-align: center;
margin: auto;
}
.form-class .el-input {
width: 75%;
}
.form-class .el-textarea {
width: 75% !important;
}
</style>

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

@ -0,0 +1,544 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="loadTable()"
>
<el-form-item label="所属组织名称" prop="orgName">
<el-cascader
ref="org"
v-model="orgIds"
:options="organizationList"
:props="{ checkStrictly: true, multiple: false, emitPath: true }"
style="width: 200px"
clearable
@change="orgChangeHandle"
>
</el-cascader>
</el-form-item>
<el-form-item label="核酸检测点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="loadTable()"
>{{ $t("query") }}</el-button
>
</el-form-item>
<el-form-item>
<el-button size="small" class="diy-button--reset" @click="resetSearch"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="div_table">
<div class="exportBtn">
<el-button
class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增检测点')"
>{{ $t("add") }}</el-button
>
<el-button
style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()"
>下载模板</el-button
>
<el-upload
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
(file) => {
beforeUpload(file);
}
"
action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入</el-button
>
</el-upload>
<el-button
style="float: left; margin-left: 10px"
class="diy-button--reset"
size="small"
@click="handleExport"
>导出</el-button
>
<!--<el-button class="diy-button&#45;&#45;reset" style="float:left;margin-left:10px"-->
<!--size="small" @click="exportHandle()">{{ $t('export') }}</el-button>-->
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible"
>发送通知</el-button
>
</div>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px;overflow: auto;"
><el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"
></el-table-column>
<el-table-column
prop="orgName"
label="所属组织名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="name"
label="核酸检测点名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="serveTime"
label="服务时间"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="mobile"
label="咨询电话"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="address"
label="检测点地址"
header-align="center"
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="150"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="addOrUpdateHandle(scope.row.id, '查看')"
>{{ "查看" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')"
>{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)"
>{{ $t("delete") }}</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="loadTable"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"
></add-or-update>
</el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog
:visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true"
>
<icpoint-noice
ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"
></icpoint-noice>
</el-dialog>
</div>
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointnucleicmonitoring-add-or-update";
import icpointNoice from "./icpointNoice";
import { requestPost , requestGet} from "@/js/dai/request";
export default {
mixins: [mixinViewModule],
data() {
return {
dataForm: {
name: "",
mobile: "",
orgId: "",
},
organizationList: [],
orgIds: [],
dialogTitle: "",
sendNoticeFormShow: false,
noticeVisible: false,
noticeOrigin: "3",
pageSize: 20,
pageNo: 0,
total: 0,
dataListLoading:false
};
},
components: {
AddOrUpdate,
icpointNoice,
},
created() {
this.loadTable()
this.noticeFun();
this.getFormInfo();
},
methods: {
async loadTable() {
this.dataListLoading = true;
const url = "/epmetuser/icPointNucleicMonitoring/page";
let params = {
limit: this.pageSize,
page: this.pageNo,
...this.dataForm
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
console.log(data.list);
this.dataList = data.list;
this.total = data.total;
} else {
this.$message.error(msg);
}
this.dataListLoading = false;
},
handleSizeChange(val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
this.pageNo = val;
this.loadTable();
},
async handleDelete(id) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteNat(id);
})
.catch((err) => {
if (err == "cancel") {
}
});
},
async deleteNat(id) {
const url = "/epmetuser/icPointNucleicMonitoring/delete";
let params = [id];
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "删除成功",
});
this.loadTable();
} else {
this.$message.error(msg);
}
},
//
async handleExport() {
let title = "核酸检测点";
const url = "/epmetuser/icPointNucleicMonitoring/point-export";
app.ajax.exportFilePost(
url,
this.dataForm,
(data, rspMsg) => {
this.download(data, title + ".xlsx");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
resetSearch() {
this.dataForm = {
name: "",
mobile: "",
orgId: "",
};
this.pageNo = 1;
this.orgIds = [];
},
//
handleSendNotice() {
this.sendNoticeFormShow = true;
},
//
diaClose() {
this.sendNoticeFormShow = false;
},
// /
addOrUpdateHandle(id, title) {
this.dialogTitle = title;
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id;
this.$refs.addOrUpdate.init();
});
this.addOrUpdateVisible = true;
},
//
closeDialog() {
this.addOrUpdateVisible = false;
this.dialogTitle = "";
},
//
getFormInfo() {
this.$http
.post(`/gov/org/agency/getOrgTreeListByCustomerId`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.organizationList = res.data;
this.deleteChildren(this.organizationList);
})
.catch(() => {});
},
//
noticeFun() {
this.$http
.post(`/epmetuser/icPointNucleicMonitoring/getShowType`)
.then(({ data: res }) => {
if (res.code === 0 && res.data) {
this.noticeVisible = true;
}
})
.catch(() => {});
},
deleteChildren(arr) {
let childs = arr;
for (let i = childs.length; i--; i > 0) {
if (childs[i].children) {
if (childs[i].children.length) {
this.deleteChildren(childs[i].children);
} else {
delete childs[i].children;
}
}
}
return arr;
},
orgChangeHandle() {
this.dataForm.orgId = this.orgIds[this.orgIds.length - 1];
console.log(this.dataForm);
},
handleExportModule() {
let title = "核酸检测点模板";
let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate";
let params = {};
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + ".xls");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download(data, fileName) {
if (!data) {
return;
}
var csvData = new Blob([data]);
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
//
beforeUpload(file) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
const isTextComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
if (!isText && !isTextComputer) {
this.$message.error("请选择正确格式的文件");
this.files = null;
this.fileName = "";
return false;
} else {
this.fileName = file.name;
return true;
}
},
async uploadFile() {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
}
this.$message({
showClose: true,
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
//
this.$refs["upload"].clearFiles();
let url = "";
let fileFormData = new FormData();
fileFormData.append("file", this.files); //filenamefiletest.zip
url = "/epmetuser/icPointNucleicMonitoring/pointImport";
window.app.ajax.post2(
url,
fileFormData,
(data, rspMsg) => {
if (data.code === 0 && data.msg == "success") {
// this.$message.success('')
} else {
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.loadTable();
},
(rspMsg, data) => {},
{ headers: { "Content-Type": "multipart/form-data" } }
);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.exportBtn {
display: flex;
align-items: center;
margin-bottom: 20px;
margin-top: 10px;
margin-left: 10px;
}
.div_left_table {
margin-top: 10px;
margin-left: 15px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
.dialog-h >>> .el-dialog__body {
overflow: scroll;
}
</style>

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

@ -0,0 +1,601 @@
<template>
<div style="max-height: 82vh; overflow: auto; padding: 20px" class="form-class">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"
>
<!--<el-form-item label="所属组织名称" prop="orgName">-->
<!--<el-select v-model="dataForm.orgName" placeholder="所属组织名称">-->
<!--<el-option-->
<!--v-for="item in organizationList"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"-->
<!--&gt;-->
<!--</el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="疫苗接种点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="疫苗接种点名称"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item
label="接种时间"
:class="dataForm.noAvailableVaccines != '2' ? '' : 'time-class'"
>
<div class="data-block">
<div style="width: 30%">
<el-date-picker
v-model="dataForm.inoculationDate"
value-format="yyyy-MM-dd"
type="date"
:clearable="false"
placeholder="选择日期"
:disabled="dialogTitle == '查看'"
>
</el-date-picker>
</div>
<div class="time-block">
<div>
<span>上午</span>
<el-time-picker
is-range
v-model="morningTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="startTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%"
>
</el-time-picker>
</div>
<div>
<span>下午</span>
<el-time-picker
is-range
v-model="afterTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="endTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%"
>
</el-time-picker>
</div>
</div>
</div>
</el-form-item>
<el-form-item label="" prop="noAvailableVaccines">
<el-checkbox
v-model="dataForm.noAvailableVaccines"
true-label="1"
false-label="2"
:disabled="dialogTitle == '查看'"
>暂无疫苗</el-checkbox
>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
:disabled="dialogTitle == '查看'"
placeholder="咨询电话"
></el-input>
</el-form-item>
<el-form-item label="接种点地址" prop="address">
<el-input
v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width: 65%"
></el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
>
</el-form-item>
<el-form-item
label="位置坐标"
class="position_label"
prop="longitude"
style="display: block"
>
<div>
<!-- <el-input
class="item_width_4"
maxlength="50"
placeholder="例:青岛市时代国际广场"
v-model="keyWords"
style="width: 200px"
:disabled='dialogTitle == "查看"'
>
</el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
> -->
<div
id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"
></div>
<div style="margin-top: 10px" v-show="false">
<span>经度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
</div>
</div>
</el-form-item>
</el-form>
<div class="submit">
<el-button @click="closeSubmit">{{ $t("cancel") }}</el-button>
<el-button
v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()"
>{{ $t("confirm") }}</el-button
>
</div>
</div>
</template>
<script>
import debounce from "lodash/debounce";
var map;
var search;
var markers;
var geocoder;
var infoWindowList;
export default {
data() {
return {
visible: false,
dataForm: {
id: "",
customerId: "",
orgId: "",
orgName: "",
pid: "",
pids: "",
name: "",
inoculationDate: "",
moStartTime: "",
moEndTime: "",
afStartTime: "",
afEndTime: "",
noAvailableVaccines: "1",
mobile: "",
address: "",
longitude: "",
latitude: "",
},
keyWords: null,
// organizationList: [],
morningTime: null,
afterTime: null,
};
},
computed: {
dataRule() {
return {
customerId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
name: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
noAvailableVaccines: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
mobile: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
address: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
longitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
latitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
props: {
dialogTitle: {
type: String,
default: "",
},
},
methods: {
startTimeChange() {
if (Array.isArray(this.morningTime) && this.morningTime.length > 0) {
let hour_0 = Number(this.morningTime[0].substring(0, 2));
let hour_1 = Number(this.morningTime[1].substring(0, 2));
let minute_0 = Number(this.morningTime[0].substring(3, 5));
let minute_1 = Number(this.morningTime[1].substring(3, 5));
let second_0 = Number(this.morningTime[0].substring(6, 8));
let second_1 = Number(this.morningTime[1].substring(6, 8));
if (hour_0 > 12 || hour_1 > 12) {
this.$message.error("请选择00:00-12:00时间段的时间");
this.morningTime = null;
return false;
}
if (hour_0 == 12) {
if (minute_0 > 0 || second_0 > 0) {
this.$message.error("请选择00:00-12:00时间段的时间");
this.morningTime = null;
return false;
}
}
if (hour_1 == 12) {
if (minute_1 > 0 || second_1 > 0) {
this.$message.error("请选择00:00-12:00时间段的时间");
this.morningTime = null;
return false;
}
}
this.dataForm.moStartTime = this.morningTime[0];
this.dataForm.moEndTime = this.morningTime[1];
}
},
endTimeChange() {
if (Array.isArray(this.afterTime) && this.afterTime.length > 0) {
let hour_0 = Number(this.afterTime[0].substring(0, 2));
let hour_1 = Number(this.afterTime[1].substring(0, 2));
let minute_0 = Number(this.afterTime[0].substring(3, 5));
let minute_1 = Number(this.afterTime[1].substring(3, 5));
let second_0 = Number(this.afterTime[0].substring(6, 8));
let second_1 = Number(this.afterTime[1].substring(6, 8));
if (hour_0 < 12 || hour_1 < 12) {
this.$message.error("请选择12:01-23:59时间段的时间");
this.afterTime = null;
return false;
}
if (hour_0 == 12) {
if (minute_0 == 0 && second_0 == 0) {
this.$message.error("请选择12:01-23:59时间段的时间");
this.afterTime = null;
return false;
}
}
if (hour_1 == 12) {
if (minute_1 == 0 && second_1 == 0) {
this.$message.error("请选择12:01-23:59时间段的时间");
this.afterTime = null;
return false;
}
}
this.dataForm.afStartTime = this.afterTime[0];
this.dataForm.afEndTime = this.afterTime[1];
}
},
closeSubmit() {
this.$emit("closeDialog");
},
// init
initMap() {
let { latitude, longitude } = this.$store.state.user;
//
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
console.log(latitude, longitude);
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45, //
});
search = new window.TMap.service.Search({ pageSize: 10 });
//
markers = new TMap.MultiMarker({
map: map,
geometries: [],
});
infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); //
//
map.on("panend", () => {
this.handleMoveCenter();
});
// this.handleMoveCenter()
this.convert();
},
handleMoveCenter() {
//
const center = map.getCenter();
const lat = center.getLat();
const lng = center.getLng();
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.setMarker(lat, lng);
this.convert(lat, lng);
},
//
handleSearchMap() {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
infoWindowList.length = 0;
markers.setGeometries([]);
//
search
.searchRectangle({
keyword: this.dataForm.address,
bounds: map.getBounds(),
})
.then((result) => {
let { data } = result;
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng },
} = data[0];
map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng);
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.convert();
} else {
this.$message.error("未检索到相关位置坐标");
}
});
},
convert(lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location;
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(
this.dataForm.latitude,
this.dataForm.longitude
);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: "main", //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
//
console.log(this.dataForm.address);
});
},
setMarker(lat, lng) {
markers.setGeometries([]);
markers.add([
{
id: "4",
styleId: "marker",
position: new TMap.LatLng(lat, lng),
properties: {
title: "marker4",
},
},
]);
},
//
// getFormInfo() {
// this.$http
// .post(`/gov/org/agency/community-list`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.organizationList = res.data;
// })
// .catch(() => {});
// },
init() {
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.initMap();
}
});
},
//
getInfo() {
this.$http
.get(`/epmetuser/icPointVaccinesInoculation/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
if (res.data.moStartTime !== "") {
this.morningTime = [res.data.moStartTime, res.data.moEndTime];
}
if (res.data.afStartTime !== "") {
this.afterTime = [res.data.afStartTime, res.data.afEndTime];
}
this.initMap();
})
.catch(() => {});
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
if (
!this.dataForm.inoculationDate &&
this.dataForm.noAvailableVaccines === "2"
) {
this.$message.error("请选择接种日期");
return false;
}
if (
this.morningTime === null &&
this.dataForm.noAvailableVaccines === "2"
) {
this.$message.error("请填写上午接种时间");
return false;
}
if (
this.afterTime === null &&
this.dataForm.noAvailableVaccines === "2"
) {
this.$message.error("请填写下午接种时间");
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](
"/epmetuser/icPointVaccinesInoculation/",
this.dataForm
)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(
res.internalMsg ? res.internalMsg : res.msg
);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
this.closeSubmit();
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>
<style scoped>
.data-block {
display: flex;
}
.time-block > div {
margin-bottom: 10px;
}
.time-block span {
padding: 10px;
}
.position_label >>> .el-form-item__label::before {
color: #fff !important;
}
.submit {
text-align: center;
margin: auto;
}
.form-class .el-input {
width: 75%;
}
.form-class .el-textarea {
width: 75% !important;
}
.time-class {
position: relative;
}
.time-class::before {
content: "*";
color: #f56c6c;
position: absolute;
left: 42px;
top: 10px;
}
</style>

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

@ -0,0 +1,521 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="loadTable()"
>
<el-form-item label="疫苗接种点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="loadTable()"
>{{ $t("query") }}</el-button
>
</el-form-item>
<el-form-item>
<el-button size="small" class="diy-button--reset" @click="resetSearch"
>重置</el-button
>
</el-form-item>
<!--<el-form-item>-->
<!--<el-button type="danger" @click="deleteHandle()">{{-->
<!--$t("deleteBatch")-->
<!--}}</el-button>-->
<!--</el-form-item>-->
</el-form>
</div>
<div class="div_table">
<div class="exportBtn">
<el-button
class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增接种点')"
>{{ $t("add") }}</el-button
>
<el-button
style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()"
>下载模板</el-button
>
<el-upload
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
(file) => {
beforeUpload(file);
}
"
action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入</el-button
>
</el-upload>
<el-button
style="float: left; margin-left: 10px"
class="diy-button--reset"
size="small"
@click="handleExport"
>导出</el-button
>
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible"
>发送通知</el-button
>
</div>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px;overflow: auto;"
>
<el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"
></el-table-column>
<el-table-column
prop="name"
label="疫苗接种点名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="inoculationDate"
label="接种日期"
header-align="center"
align="center"
></el-table-column>
<el-table-column
label="上午接种时间"
header-align="center"
align="center"
>
<template slot-scope="scope">
<div>{{ scope.row.moStartTime }} - {{ scope.row.moEndTime }}</div>
</template>
</el-table-column>
<el-table-column
label="下午接种时间"
header-align="center"
align="center"
>
<template slot-scope="scope">
<div>{{ scope.row.afStartTime }} - {{ scope.row.afEndTime }}</div>
</template>
</el-table-column>
<el-table-column
prop="noAvailableVaccines"
label="暂无疫苗"
header-align="center"
width="100"
align="center"
></el-table-column>
<el-table-column
prop="mobile"
label="咨询电话"
header-align="center"
width="150"
align="center"
></el-table-column>
<el-table-column
prop="address"
label="接种点地址"
header-align="center"
align="center"
width="230"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="150"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="addOrUpdateHandle(scope.row.id, '查看')"
>{{ "查看" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')"
>{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)"
>{{ $t("delete") }}</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="loadTable"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"
></add-or-update>
</el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog
:visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true"
>
<icpoint-noice
ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"
></icpoint-noice>
</el-dialog>
</div>
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointvaccinesinoculation-add-or-update";
import icpointNoice from "./icpointNoice";
import { requestPost , requestGet} from "@/js/dai/request";
export default {
mixins: [mixinViewModule],
data() {
return {
dataForm: {
name: "",
mobile: "",
},
updateId: null,
sendNoticeFormShow: false,
noticeVisible: false,
noticeOrigin: "4",
dialogTitle: "",
pageSize: 20,
pageNo: 0,
total: 0,
dataListLoading:false,
};
},
components: {
AddOrUpdate,
icpointNoice,
},
mounted() {
this.loadTable();
this.noticeFun();
},
methods: {
async loadTable() {
this.dataListLoading = true;
const url = "/epmetuser/icPointVaccinesInoculation/page";
let params = {
limit: this.pageSize,
page: this.pageNo,
...this.dataForm
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
console.log(data.list);
this.dataList = data.list;
this.total = data.total;
} else {
this.$message.error(msg);
}
this.dataListLoading = false;
},
handleSizeChange(val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
this.pageNo = val;
this.loadTable();
},
async handleDelete(id) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteNat(id);
})
.catch((err) => {
if (err == "cancel") {
}
});
},
async deleteNat(id) {
const url = "/epmetuser/icPointVaccinesInoculation/delete";
let params = [id];
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "删除成功",
});
this.loadTable();
} else {
this.$message.error(msg);
}
},
//
async handleExport() {
let title = "疫苗接种点";
const url = "/epmetuser/icPointVaccinesInoculation/point-export";
app.ajax.exportFilePost(
url,
this.dataForm,
(data, rspMsg) => {
this.download(data, title + ".xlsx");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
resetSearch() {
this.dataForm = {
name: "",
mobile: "",
};
this.pageNo = 1;
},
//
handleSendNotice() {
this.sendNoticeFormShow = true;
},
//
diaClose() {
this.sendNoticeFormShow = false;
},
//
noticeFun() {
this.$http
.post(`/epmetuser/icPointNucleicMonitoring/getShowType`)
.then(({ data: res }) => {
if (res.code === 0 && res.data) {
this.noticeVisible = true;
}
})
.catch(() => {});
},
// /
addOrUpdateHandle(id, title) {
this.dialogTitle = title;
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id;
this.$refs.addOrUpdate.init();
});
this.addOrUpdateVisible = true;
},
//
closeDialog() {
this.addOrUpdateVisible = false;
this.dialogTitle = "";
},
handleExportModule() {
let title = "疫苗接种点模板";
let url = "/epmetuser/icPointVaccinesInoculation/exporttemplate";
let params = {};
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + ".xls");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download(data, fileName) {
if (!data) {
return;
}
var csvData = new Blob([data]);
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
//
beforeUpload(file) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
const isTextComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
if (!isText && !isTextComputer) {
this.$message.error("请选择正确格式的文件");
this.files = null;
this.fileName = "";
return false;
} else {
this.fileName = file.name;
return true;
}
},
async uploadFile() {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
}
this.$message({
showClose: true,
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
//
this.$refs["upload"].clearFiles();
let url = "";
let fileFormData = new FormData();
fileFormData.append("file", this.files); //filenamefiletest.zip
url = "/epmetuser/icPointVaccinesInoculation/pointImport";
window.app.ajax.post2(
url,
fileFormData,
(data, rspMsg) => {
if (data.code === 0 && data.msg == "success") {
// this.$message.success('')
} else {
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.loadTable();
},
(rspMsg, data) => {},
{ headers: { "Content-Type": "multipart/form-data" } }
);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.exportBtn {
display: flex;
align-items: center;
margin-bottom: 20px;
margin-top: 10px;
margin-left: 10px;
}
.div_left_table {
margin-top: 10px;
margin-left: 15px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
.dialog-h {
overflow: scroll;
}
</style>

145
src/views/modules/plugins/rent/hikerrorinfo-add-or-update.vue

@ -0,0 +1,145 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="删除标记 0:未删除,1:已删除" prop="delFlag">
<el-input v-model="dataForm.delFlag" placeholder="删除标记 0:未删除,1:已删除"></el-input>
</el-form-item>
<el-form-item label="乐观锁" prop="revision">
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label="更新人" prop="updatedBy">
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input>
</el-form-item>
<el-form-item label="更新时间" prop="updatedTime">
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input>
</el-form-item>
<el-form-item label="客户ID" prop="customerId">
<el-input v-model="dataForm.customerId" placeholder="客户ID"></el-input>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="dataForm.idCard" placeholder="身份证号"></el-input>
</el-form-item>
<el-form-item label="错误类型 0:token,1:人员,2权限" prop="errorType">
<el-input v-model="dataForm.errorType" placeholder="错误类型 0:token,1:人员,2权限"></el-input>
</el-form-item>
<el-form-item label="错误详情" prop="errorInfo">
<el-input v-model="dataForm.errorInfo" placeholder="错误详情"></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
delFlag: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
customerId: '',
idCard: '',
errorType: '',
errorInfo: ''
}
}
},
computed: {
dataRule () {
return {
delFlag: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
revision: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
customerId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
idCard: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
errorType: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
errorInfo: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getInfo () {
this.$http.get(`/hik/hikErrorInfo/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/hik/hikErrorInfo/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

60
src/views/modules/plugins/rent/hikerrorinfo.vue

@ -0,0 +1,60 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-hik__hikErrorInfo}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="idCard" label="身份证号" header-align="center" align="center"></el-table-column>
<el-table-column prop="errorInfo" label="错误详情" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<!-- <el-button v-if="$hasPermission('hik:hikErrorInfo:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>-->
<!-- <el-button v-if="$hasPermission('hik:hikErrorInfo:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>-->
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './hikerrorinfo-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/pli/power/hikErrorInfo/page',
getDataListIsPage: true,
deleteURL: '/pli/power/hikErrorInfo',
deleteIsBatch: true
},
dataForm: {
id: ''
}
}
},
components: {
AddOrUpdate
}
}
</script>

50
src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue

@ -70,6 +70,10 @@
</el-select>
</el-form-item>
<br/>
<el-form-item label="出租人现居住地" prop="lessorLiveAddress">
<el-input v-model="dataForm.lessorLiveAddress" placeholder="出租人现居住地" disabled></el-input>
</el-form-item>
<br/>
<el-form-item label="中介合同附件" prop="agencyImgList" v-if="dataForm.lessorRelation ==='中介'">
<template>
<label v-for="(item,index) in dataForm.agencyImgList" :key="index">
@ -94,6 +98,10 @@
<el-input v-model="dataForm.lesseeUnit" placeholder="工作单位" disabled></el-input>
</el-form-item>
<br/>
<el-form-item label="承租人户籍地" prop="lesseeHouseAddress">
<el-input v-model="dataForm.lesseeHouseAddress" placeholder="承租人户籍地" disabled></el-input>
</el-form-item>
<br/>
<div style="margin-left: 50px;height: 30px;font-weight: bold;">合同内容</div>
@ -116,18 +124,32 @@
</label>
</template>
</el-form-item>
<el-form-item label="审核原因" prop="reason" v-if="dataForm.flag === '1' && dataForm.state === '2'">
<el-input v-model="dataForm.reason" placeholder="审核原因" disabled></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<div class="resi-btns">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button v-if="dataForm.state === '0'" type="danger" @click="checkHandle('2')">{{ $t('checkBTGBtn') }}</el-button>
<el-button v-if="dataForm.state === '0'" type="danger" @click="openCheckReasonDialog">{{ $t('checkBTGBtn') }}</el-button>
<el-button v-if="dataForm.state === '0'" type="primary" @click="checkHandle('1')">{{ $t('checkTGBtn') }}</el-button>
</div>
</template>
<el-dialog :visible.sync="dialogVisible" :modal="false">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<el-dialog
title="审核不通过原因"
:visible.sync="checkVisible"
width="30%"
append-to-body>
<el-input v-model="checkReason" placeholder="请输入审核不通过原因"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="checkVisible = false"> </el-button>
<el-button type="primary" @click="dialogCheckHandle" :disabled="disabledBtn"> </el-button>
</span>
</el-dialog>
</el-dialog>
</template>
@ -154,10 +176,12 @@ export default {
lessorIdCard: '',
lessorMobile: '',
lessorRelation: '',
lessorLiveAddress: '',
lesseeName: '',
lesseeIdCard: '',
lesseeMobile: '',
lesseeUnit: '',
lesseeHouseAddress: '',
signDate: '',
startDate: '',
endDate: ''
@ -176,7 +200,10 @@ export default {
{ dictValue: '孙子女', dictName: '孙子女' },
{ dictValue: '兄弟姐妹', dictName: '兄弟姐妹' },
{ dictValue: '中介', dictName: '中介' }
]
],
checkReason: '',
checkVisible: false,
disabledBtn: false
}
},
computed: {
@ -269,13 +296,28 @@ export default {
}
}).catch(() => {})
},
//
openCheckReasonDialog(){
this.checkVisible = true
this.checkReason = ''
this.disabledBtn = false
},
//
dialogCheckHandle(){
if(this.checkReason === ''){
return this.$message.error('请填写不通过原因')
}
this.checkHandle('2')
this.disabledBtn = true
},
//
checkHandle: function (type) {
const params = {
id: this.dataForm.id,
state: type,
homeId: this.dataForm.homeId,
lessorRelation: this.dataForm.lessorRelation
lessorRelation: this.dataForm.lessorRelation,
reason: this.checkReason
}
this.$http.post('/pli/power/rentContractInfo/review', params).then(({ data: res }) => {
if (res.code !== 0) {
@ -296,6 +338,8 @@ export default {
type: 'success',
duration: 500,
onClose: () => {
this.disabledBtn = false
this.checkVisible = false
this.visible = false
this.$emit('refreshDataList')
}

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

@ -21,7 +21,7 @@
:formBtnFixed="false"
idName="enterpriseId"
>
<template v-slot:editElse="{ id, formType, info }">
<template v-slot:editBottomSup="{ id, formType, info }">
<record
v-if="formType != 'add' && id"
:formType="formType"

15
src/views/modules/visual/basicinfo/cpts/incident-info.vue

@ -399,7 +399,13 @@ export default {
//
async getInfo() {
const url = "/gov/project/resievent/eventdetail-icdata";
let url = "/gov/project/icEvent/icevent-eventdetail-icdata";
// 沿
if (
this.$store.state.user.customerId == "b09527201c4409e19d1dbc5e3c3429a1"
) {
url = "/gov/project/resievent/eventdetail-icdata";
}
const { data, code, msg } = await requestPost(url, {
resiEventId: this.resiEventId,
@ -414,7 +420,12 @@ export default {
//
async getComment() {
const url = "/gov/project/resieventreply/list";
let url = "/gov/project/icEvent/icevent-list";
if (
this.$store.state.user.customerId == "b09527201c4409e19d1dbc5e3c3429a1"
) {
url = "/gov/project/resieventreply/list";
}
const { data, code, msg } = await requestPost(url, {
resiEventId: this.resiEventId,

71
src/views/modules/visual/basicinfo/people.vue

@ -493,13 +493,24 @@
@close="showedDemandInfo = false"
/>
<incident-info
v-if="incident.list.length > 0 && incident.showedInfo"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false"
/>
<template v-if="incident.list.length > 0 && incident.showedInfo">
<incident-info
v-if="
$store.state.user.customerId == 'b09527201c4409e19d1dbc5e3c3429a1'
"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false"
/>
<event-info
v-else
:eventId="incident.list[incident.currentIndex].resiEventId"
:orgId="$store.state.user.agencyId"
orgType="agency"
@close="incident.showedInfo = false"
/>
</template>
<topic-info
v-if="topic.list.length > 0 && topic.showedInfo"
@ -519,11 +530,31 @@ import cptCard from "@/views/modules/visual/cpts/card";
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
import demandInfo from "@/views/modules/visual/measure/dialogInfo";
import incidentInfo from "@/views/modules/visual/basicinfo/cpts/incident-info";
import eventInfo from "@/views/modules/visual/communityGovern/shijianchuli/event-info.vue";
import topicInfo from "@/views/modules/visual/basicinfo/cpts/topic-info";
import cptTb from "@/views/modules/visual/cpts/tb";
export default {
name: "HomeMap",
components: {
cptCard,
peopleMore,
cptTb,
demandInfo,
incidentInfo,
topicInfo,
eventInfo,
},
props: {
uid: {
type: String,
default: "",
// default: "8ada68cb6f1e4b9a8333348a39ef3aee",
},
},
data() {
return {
breadList: [],
@ -626,24 +657,8 @@ export default {
};
},
props: {
uid: {
type: String,
default: "",
// default: "8ada68cb6f1e4b9a8333348a39ef3aee",
},
},
computed: {},
components: {
cptCard,
peopleMore,
cptTb,
demandInfo,
incidentInfo,
topicInfo,
},
beforeRouteEnter(to, from, next) {
console.log("让我看看", to);
if (from) {
@ -811,7 +826,15 @@ export default {
//
async getIncidentData() {
const url = "/gov/project/resievent/pageuserreported";
let url = "/gov/project/icEvent/icevent-pageuserreported";
// 沿
if (
this.$store.state.user.customerId == "b09527201c4409e19d1dbc5e3c3429a1"
) {
url = "/gov/project/resievent/pageuserreported";
}
let params = {
epmetUserIdList: this.info.epmetUserIdList,
userId: this.userId,

2063
src/views/modules/visual/communityGovern/fivelayers/mapIndex copy 2.vue

File diff suppressed because it is too large

1987
src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue

File diff suppressed because it is too large

2071
src/views/modules/visual/communityGovern/fivelayers/mapIndex-baidu.vue

File diff suppressed because it is too large

32
src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue

@ -373,6 +373,8 @@
import 'ol/ol.css'
import { Map, View } from 'ol'
import TileLayer from 'ol/layer/Tile.js';
import ImageLayer from 'ol/layer/Image';
import { Raster as RasterSource } from 'ol/source';
import XYZ from 'ol/source/XYZ.js';
import VectorLayer from 'ol/layer/Vector.js';
import VectorSource from 'ol/source/Vector.js';
@ -489,6 +491,28 @@ var polygonStyleFunction = (function () {
};
})()
//
let reverseFunc = function (pixelsTemp) {
//
for (var i = 0; i < pixelsTemp.length; i += 4) {
var r = pixelsTemp[i];
var g = pixelsTemp[i + 1];
var b = pixelsTemp[i + 2];
//
var grey = r * 0.3 + g * 0.59 + b * 0.11;
//rgb
pixelsTemp[i] = grey;
pixelsTemp[i + 1] = grey;
pixelsTemp[i + 2] = grey;
//
pixelsTemp[i] = 55 - pixelsTemp[i];
pixelsTemp[i + 1] = 255 - pixelsTemp[i + 1];
pixelsTemp[i + 2] = 305 - pixelsTemp[i + 2];
}
};
const vueGis = {
name: 'HomeMap',
data () {
@ -1644,9 +1668,13 @@ const vueGis = {
url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',
wrapX: true//xfalse
}),
zIndex: 20
zIndex: 20,
crossOrigin: 'anonymous'
});
mapView = new View({
//
center: this.centerPoint,
@ -1676,6 +1704,8 @@ const vueGis = {
});
map.removeInteraction(dblClickInteraction);
},
//
addParentLayer () {

4
src/views/modules/visual/components/screen-map/index.vue

@ -422,7 +422,7 @@ const vueGis = {
// imgSize: [32, 32],
// scale: 0.5,
// src: oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex] || this.iconUrlArray[0] || this.iconUrlArray[0]
src: (oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex]) || (oneIcon.index &&this.iconUrlArray[oneIcon.index]) || this.iconUrlArray[0]
src: (oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex]) || (oneIcon.index && this.iconUrlArray[oneIcon.index]) || this.iconUrlArray[0]
}),
// text: createTextStyle(oneIcon)
});
@ -627,6 +627,8 @@ const vueGis = {
this.zoom = 13
} else if (level === 'community') {
this.zoom = 14
} else {
this.zoom = 12
}
},

17
src/views/modules/visual/cpts/tb.vue

@ -21,13 +21,22 @@
<tbody class="table-body">
<tr class="table-body-tr"
v-for="(value, index) in list"
:key="index">
:key="index"
@click="handleClickRow(index)">
<td class="td"
v-for="(item, indexs) in value"
:key="indexs">
<div v-if="typeof item === 'string' || typeof item === 'number'">
{{ item }}
</div>
<div v-if="typeof item === 'object'&& item.type === 'img'">
<!-- <span>{{ item.type+ item.src}}</span> -->
<img style="width:18px;height:18px"
:src="item.src"
alt="" />
</div>
<div v-if="typeof item === 'object' && item && item.type == 'index'">
<img v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png"
@ -139,6 +148,10 @@ export default {
created () { },
methods: {
//
handleClickRow (index) {
this.$emit("handleClickRow", index);
},
handleClickBtn (index, type) {
this.$emit("operate", index, type);
},
@ -191,7 +204,7 @@ export default {
box-sizing: border-box;
text-align: center;
border: none;
padding: 20px 5px;
padding: 10px 5px;
> div {
overflow: hidden;

2
src/views/modules/workPc/guidance/DetailForm.vue

@ -334,7 +334,7 @@ export default {
this.$message.error(msg)
}
},
dormatHtml(content) {
dormatHtml (content) {
let c = ''
if (content.indexOf('DOCTYPE') != -1) {
c = content.slice(45, -16);

Loading…
Cancel
Save