Browse Source

Merge remote-tracking branch 'origin/yantai_master' into 烟台master

yantai_master
jianjun 3 years ago
parent
commit
95b90aa25a
  1. 19
      src/assets/scss/modules/management/form-main.scss
  2. 3
      src/assets/scss/modules/management/list-main.scss
  3. 36
      src/utils/cascader.js
  4. 2
      src/views/modules/base/collect.vue
  5. 4
      src/views/modules/base/epidemic/antiInfo.vue
  6. 4
      src/views/modules/base/epidemic/natInfo/natList.vue
  7. 6
      src/views/modules/base/epidemic/veroFocus/veroFocusList.vue
  8. 221
      src/views/modules/communityParty/article/cpts/offline.vue
  9. 394
      src/views/modules/communityParty/article/drafts.vue
  10. 524
      src/views/modules/communityParty/article/index.vue
  11. 354
      src/views/modules/communityParty/heart/heartAudit.vue
  12. 376
      src/views/modules/communityParty/heart/heartFinish.vue
  13. 1067
      src/views/modules/communityParty/heart/heartForm.vue
  14. 680
      src/views/modules/communityParty/heart/heartList.vue
  15. 291
      src/views/modules/communityParty/heart/heartPerson.vue
  16. 214
      src/views/modules/communityParty/heart/heartReview.vue
  17. 543
      src/views/modules/cpts/base/cpts/edit.vue
  18. 141
      src/views/modules/cpts/base/index.vue
  19. 50
      src/views/modules/plugins/rent/rentcontractinfo-add-or-update.vue
  20. 2
      src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue
  21. 2063
      src/views/modules/visual/communityGovern/fivelayers/mapIndex copy 2.vue
  22. 1987
      src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue
  23. 2071
      src/views/modules/visual/communityGovern/fivelayers/mapIndex-baidu.vue
  24. 32
      src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue
  25. 7
      src/views/modules/visual/communityGovern/shijianchuli/lineOption.js
  26. 4
      src/views/modules/visual/components/screen-map/index.vue
  27. 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;
}

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 () {

6
src/views/modules/base/epidemic/veroFocus/veroFocusList.vue

@ -756,14 +756,14 @@ export default {
async deleteFocus (row) {
const url = "/epmetuser/icEpidemicSpecialAttention/cancel-attention";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/del"
let idCards = [];
let ids = [];
this.selectionAll.forEach((element) => {
idCards.push(element.idCard);
ids.push(element.id);
});
let params = {
attentionType: 1,
idCards: idCards,
ids: ids,
};
const { data, code, msg } = await requestPost(url, params);

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;
});
}
});
},
},

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"

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 () {

7
src/views/modules/visual/communityGovern/shijianchuli/lineOption.js

@ -25,6 +25,13 @@ export function lineOption () {
}
},
// grid: {
// left: '5%',
// right: '5%',
// bottom: '5%',
// top: '10%',
// containLabel: true
// },
xAxis: {
type: 'category',
// boundaryGap: false,

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
}
},

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