Browse Source

Merge branch 'dev-bug-temp' into test

test
dai 3 years ago
parent
commit
e5ff1dbff4
  1. 5
      src/views/components/resiSearch.vue
  2. 25
      src/views/components/tinymce2/index.vue
  3. 666
      src/views/modules/base/collect.vue
  4. 725
      src/views/modules/communityParty/members/points.vue
  5. 14
      src/views/modules/communityParty/regionalParty/activitysForm.vue
  6. 728
      src/views/modules/communityService/measure/points.vue
  7. 10
      src/views/modules/workPc/guidance/DetailForm.vue
  8. 517
      src/views/modules/workSys/pointAditive/rule.vue

5
src/views/components/resiSearch.vue

@ -173,6 +173,7 @@
size="small"
clearable
class="resi-cell-select"
:multiple="n.multiSelect == 1 ? true : false"
>
<el-option
v-for="item in n.options"
@ -446,7 +447,7 @@ export default {
// columnValue: []
columnValue: this.form[item.columnName] &&
(itemTypes.includes(item.queryType) ||
itemTypes.includes(item.itemType)
itemTypes.includes(item.itemType) || item.multiSelect == 1
? this.form[item.columnName]
: [this.form[item.columnName].toString()])
}
@ -672,7 +673,7 @@ export default {
}
}
.resi-row-box {
height: 104px;
height: 214px;
overflow: hidden;
transition: height 0.5s;
}

25
src/views/components/tinymce2/index.vue

@ -1,5 +1,6 @@
<template>
<editor v-model="content" tag-name="div" :init="init" />
<editor id="editors" v-model="content" tag-name="div" :init="init" />
<!-- <textarea id="editors" v-model="content" /> -->
</template>
<script>
@ -66,6 +67,7 @@ export default {
let token = this.getUserToken();
let init = {
selector: '#editors',
language_url: require("./zh_CN.js"), //
language: "zh_CN",
skin_url: require("tinymce/skins/ui/oxide/skin.css"), //
@ -78,6 +80,7 @@ export default {
toolbar_mode: "none",
toolbar_drawer: "sliding",
toolbar_mode: "sliding",
outputFormat: 'p',
plugins:
"wordcount visualchars visualblocks toc textpattern template tabfocus spellchecker searchreplace save quickbars print preview paste pagebreak noneditable nonbreaking media insertdatetime importcss imagetools image hr help fullscreen fullpage directionality codesample code charmap link code table lists advlist anchor autolink autoresize autosave", // import
toolbar:
@ -150,7 +153,9 @@ export default {
revert_data,
};
},
mounted() {},
mounted() {
tinymce.init(this.init)
},
methods: {
vModel(editor) {
// setContent
@ -159,16 +164,32 @@ export default {
if (editor && val !== prevVal && val !== editor.getContent()) {
if (typeof val !== "string") val = val.toString();
debounceSetContent.call(editor, val);
return
}
// debounceSetContent.call(editor, this.dormatHtml(val));
});
editor.on("change keyup undo redo", () => {
// console.log('editor.getContent()---', editor.getContent({ format : 'p' }))
const c = editor.getContent({ format : 'p' })
this.$emit("input", editor.getContent());
// debounce(500, this.$emit("input", editor.getContent({ format : 'p' })));
;
});
editor.on("blur", () => {
// console.log('editor.blur--', editor.getContent({ format : 'p' }))
// editor.getContent(editor.getContent({ format : 'p' }))
this.$emit("blur");
});
},
dormatHtml(content) {
let c = ''
if (content.indexOf('DOCTYPE') != -1) {
c = content.slice(45, -16);
}
console.log('content', typeof content)
return c || content
},
getUserToken() {
return localStorage.getItem("token");
},

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

@ -1,144 +1,191 @@
<template>
<div class="resi-container">
<el-card ref="searchCard"
class="search-card">
<el-form ref="searchForm"
:inline="true"
:model="fmData"
class="demo-form-inline">
<el-form-item v-if="communityList.length > 0"
label="所在社区"
prop="orgId">
<el-select v-model.trim="fmData.orgId"
placeholder="所在社区"
size="small"
clearable
class="resi-cell-input">
<el-option v-for="item in communityList"
:key="item.orgId"
:label="item.orgName"
:value="item.orgId">
<el-card ref="searchCard" class="search-card">
<el-form
ref="searchForm"
:inline="true"
:model="fmData"
class="demo-form-inline"
>
<el-form-item
v-if="communityList.length > 0"
label="所在社区"
prop="orgId"
>
<el-select
v-model.trim="fmData.orgId"
placeholder="所在社区"
size="small"
clearable
class="resi-cell-input"
>
<el-option
v-for="item in communityList"
:key="item.orgId"
:label="item.orgName"
:value="item.orgId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="居住地址"
prop="address">
<el-input v-model="fmData.address"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入">
<el-form-item label="居住地址" prop="address">
<el-input
v-model="fmData.address"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="填写时间"
prop="startTime">
<el-date-picker v-model="timeRange"
type="daterange"
clearable
size="small"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
<el-form-item label="填写时间" prop="startTime">
<el-date-picker
v-model="timeRange"
type="daterange"
clearable
size="small"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item label="户籍地址"
prop="domicilePlace">
<el-input v-model="fmData.domicilePlace"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入">
<el-form-item label="户籍地址" prop="domicilePlace">
<el-input
v-model="fmData.domicilePlace"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item>
<el-button class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button class="diy-button--reset"
size="small"
@click="resetForm('searchForm')">重置</el-button>
<el-button
class="diy-button--search"
size="small"
@click="handleSearch"
>查询</el-button
>
<el-button
class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button
>
</el-form-item>
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="handleChu"
class="diy-button--reset"
size="small">导出</el-button>
<el-button @click="handleChu" class="diy-button--reset" size="small"
>导出</el-button
>
</div>
<el-table :data="tableData"
border
style="width: 100%"
class="resi-table"
:height="tableHeight"
:span-method="arraySpanMethod">
<el-table-column label="序号"
prop="desc"
align="center"
width="50" />
<el-table-column prop="houseHolderName"
width="100"
label="户主姓名"
align="center" />
<el-table-column prop="address"
align="center"
min-width="140"
label="居住地址"
:show-overflow-tooltip="true" />
<el-table-column prop="houseType"
align="center"
width="100"
label="自有/租住">
<el-table
:data="tableData"
border
style="width: 100%"
class="resi-table"
:height="tableHeight"
:span-method="arraySpanMethod"
>
<el-table-column label="序号" prop="desc" align="center" width="50" />
<el-table-column
prop="houseHolderName"
width="100"
label="户主姓名"
align="center"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="address"
align="center"
min-width="140"
label="居住地址"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="houseType"
align="center"
width="100"
label="自有/租住"
>
<template slot-scope="scope">
<span>
{{ scope.row.houseType == '1' ? '自有' : '租住' }}
</span>
<span v-if="scope.row.houseType == 1">出租</span>
<span v-if="scope.row.houseType == 2">闲置</span>
<span v-if="scope.row.houseType == 3">未售出</span>
<span v-if="scope.row.houseType == 0">自住</span>
</template>
</el-table-column>
<el-table-column prop="totalResi"
width="80"
align="center"
label="居住人数" />
<el-table-column prop="memberName"
width="100"
label="成员姓名"
align="center"
:show-overflow-tooltip="true" />
<el-table-column prop="memberIdNum"
width="180"
align="center"
label="成员身份证" />
<el-table-column prop="memberMobile"
width="140"
align="center"
label="成员手机号" />
<el-table-column prop="heSuanCount"
width="120"
align="center"
label="核酸检测次数" />
<el-table-column
prop="totalResi"
width="80"
align="center"
label="居住人数"
/>
<el-table-column
prop="memberName"
width="100"
label="成员姓名"
align="center"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="memberIdNum"
width="180"
align="center"
label="成员身份证"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="memberMobile"
width="140"
align="center"
label="成员手机号"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="heSuanCount"
width="120"
align="center"
label="核酸检测次数"
/>
<el-table-column prop="ymjz"
width="140"
align="center"
label="疫苗接种情况">
<el-table-column
prop="ymjz"
width="140"
align="center"
label="疫苗接种情况"
>
<template slot-scope="scope">
<span v-if="scope.row.ymjz == 1">全程接种</span>
<span v-if="scope.row.ymjz == 2">未全程接种</span>
<span v-if="scope.row.ymjz == 0">未接种</span>
</template>
</el-table-column>
<el-table-column prop="domicilePlace"
min-width="140"
align="center"
label="户籍所在地 " />
<el-table-column prop="workPlace"
min-width="120"
align="center"
label="单位或学校 " />
<!-- <el-table-column prop="organizationCreatedTime" align="center" label="创建时间"> -->
<el-table-column
prop="domicilePlace"
min-width="140"
align="center"
label="户籍所在地"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="workPlace"
min-width="120"
align="center"
label="单位或学校 "
:show-overflow-tooltip="true"
/>
<el-table-column
prop="remark"
align="center"
label="备注"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button
@ -152,115 +199,152 @@
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</el-card>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="信息详情"
width="60%"
top="5vh"
class="dialog-h"
@closed="handleClose">
<div class="scroll-h">
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:disabled="true"
class="form">
<el-form-item label="户主姓名:"
prop="houseHolderName"
label-width="150px">
<!-- <el-input class="item_width_1"
<el-dialog
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="信息详情"
width="1100px"
top="5vh"
class="dialog-h"
@closed="handleClose"
>
<div class="scroll-h">
<el-form
ref="ref_form"
:inline="true"
:model="dataForm"
:disabled="true"
class="form"
>
<el-form-item
label="户主姓名:"
prop="houseHolderName"
label-width="150px"
>
<!-- <el-input class="item_width_1"
v-model="dataForm.houseHolderName">
</el-input> -->
<div class="wd50">{{ dataForm.houseHolderName }}</div>
</el-form-item>
<el-form-item label="居住地址:"
prop="address"
label-width="150px">
<!-- <el-input class="wd50" v-model="dataForm.address">
<div class="wd50">{{ dataForm.houseHolderName }}</div>
</el-form-item>
<el-form-item label="居住地址:" prop="address" label-width="150px">
<!-- <el-input class="wd50" v-model="dataForm.address">
</el-input> -->
<div class="wd50"> {{ dataForm.address }}</div>
</el-form-item>
<div>
<el-form-item label="自有/租住:"
prop="houseType"
label-width="150px">
<!-- <el-input class="item_width_1"
<div class="wd50">{{ dataForm.address }}</div>
</el-form-item>
<div>
<el-form-item
label="自有/租住:"
prop="houseType"
label-width="150px"
>
<!-- <el-input class="item_width_1"
v-model="dataForm.houseType">
</el-input> -->
<div class="wd50">{{ dataForm.houseType }}</div>
</el-form-item>
<el-form-item label="居住人数:"
prop="totalResi"
label-width="150px">
<!-- <el-input class="item_width_1"
<div class="wd50">{{ dataForm.houseType }}</div>
</el-form-item>
<el-form-item
label="居住人数:"
prop="totalResi"
label-width="150px"
>
<!-- <el-input class="item_width_1"
v-model="dataForm.totalResi">
</el-input> -->
<div class="wd50">{{ dataForm.totalResi }}</div>
</el-form-item>
</div>
</el-form>
<el-table :data="dataForm.list"
border
style="width: 100%"
class="resi-table"
:height="tableHeight">
<el-table-column label="序号"
type="index"
align="center"
width="50" />
<el-table-column prop="memberName"
width="100"
label="成员姓名"
align="center"
:show-overflow-tooltip="true" />
<el-table-column prop="memberIdNum"
width="180"
align="center"
label="成员身份证" />
<el-table-column prop="memberMobile"
width="140"
align="center"
label="成员手机号" />
<el-table-column prop="heSuanCount"
width="120"
align="center"
label="核酸检测次数" />
<div class="wd50">{{ dataForm.totalResi }}</div>
</el-form-item>
</div>
</el-form>
<el-table
:data="dataForm.list"
border
style="width: 1060px; margin: 20px"
class="resi-table"
:height="tableHeight"
>
<el-table-column
label="序号"
type="index"
align="center"
width="50"
/>
<el-table-column
prop="memberName"
width="100"
label="成员姓名"
align="center"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="memberIdNum"
width="180"
align="center"
label="成员身份证"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="memberMobile"
width="140"
align="center"
label="成员手机号"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="heSuanCount"
width="120"
align="center"
label="核酸检测次数"
/>
<el-table-column prop="ymjz"
width="140"
align="center"
label="疫苗接种情况">
<template slot-scope="scope">
<span v-if="scope.row.ymjz == 1">全程接种</span>
<span v-if="scope.row.ymjz == 2">未全程接种</span>
<span v-if="scope.row.ymjz == 0">未接种</span>
</template>
</el-table-column>
<el-table-column prop="domicilePlace"
min-width="140"
align="center"
label="户籍所在地 " />
<el-table-column prop="workPlace"
min-width="120"
align="center"
label="单位或学校 " />
<!-- <el-table-column prop="organizationCreatedTime" align="center" label="创建时间"> -->
</el-table>
</div>
<el-table-column
prop="ymjz"
width="140"
align="center"
label="疫苗接种情况"
>
<template slot-scope="scope">
<span v-if="scope.row.ymjz == 1">全程接种</span>
<span v-if="scope.row.ymjz == 2">未全程接种</span>
<span v-if="scope.row.ymjz == 0">未接种</span>
</template>
</el-table-column>
<el-table-column
prop="domicilePlace"
min-width="140"
align="center"
label="户籍所在地 "
:show-overflow-tooltip="true"
/>
<el-table-column
prop="workPlace"
min-width="120"
align="center"
label="单位或学校 "
:show-overflow-tooltip="true"
/>
<el-table-column
prop="remark"
align="center"
label="备注"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</template>
@ -272,7 +356,7 @@ import { mapGetters } from "vuex";
import axios from "axios";
export default {
data () {
data() {
return {
openSearch: false,
@ -284,13 +368,13 @@ export default {
total: 1,
tableData: [],
timeRange: '',
timeRange: "",
fmData: {
orgId: '',
orgId: "",
startTime: "",
endTime: "",
address: '',
domicilePlace: ''
address: "",
domicilePlace: "",
},
dataForm: {},
communityList: [],
@ -300,15 +384,15 @@ export default {
};
},
computed: {
...mapGetters(['clientHeight', 'iframeHeight']),
tableHeight () {
const h = this.clientHeight - 360 + this.iframeHeigh
const _h = this.clientHeight - 360
return this.$store.state.inIframe ? h : _h
}
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() {
const h = this.clientHeight - 360 + this.iframeHeigh;
const _h = this.clientHeight - 360;
return this.$store.state.inIframe ? h : _h;
},
},
watch: {
timeRange (val) {
timeRange(val) {
if (Array.isArray(val) && val.length == 2) {
this.fmData.startTime = val[0];
this.fmData.endTime = val[1];
@ -318,32 +402,39 @@ export default {
}
},
},
mounted () {
this.getcommunityList()
mounted() {
this.getcommunityList();
this.getTableData();
},
methods: {
arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log('row-----r', row)
// console.log('column-----c', column)
if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2 || columnIndex === 3 || columnIndex === 4) {
let index = this.spanIndex.findIndex(item => item.firstIndex === rowIndex)
if (
columnIndex === 0 ||
columnIndex === 1 ||
columnIndex === 2 ||
columnIndex === 3 ||
columnIndex === 4
) {
let index = this.spanIndex.findIndex(
(item) => item.firstIndex === rowIndex
);
if (index > -1) {
return {
rowspan: this.spanIndex[index].len,
colspan: 1
colspan: 1,
};
} else {
return {
rowspan: 0,
colspan: 0
colspan: 0,
};
}
}
},
async handleChu () {
const url =
"/epmetuser/icresicollect/export";
async handleChu() {
const url = "/epmetuser/icresicollect/export";
const { pageSize, pageNo, fmData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
@ -376,33 +467,33 @@ export default {
return this.$message.error("网络错误");
});
},
handleSizeChange (val) {
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
handleClose () {
handleClose() {
this.formShow = false;
},
handleSearch (val) {
handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
resetForm (formName) {
this.$refs[formName].resetFields()
this.timeRange = ''
this.handleSearch()
resetForm(formName) {
this.$refs[formName].resetFields();
this.timeRange = "";
this.handleSearch();
},
async handleWatch (row) {
async handleWatch(row) {
// this.formShow = true;
await nextTick();
const url = "/epmetuser/icresicollect/detail";
@ -412,8 +503,11 @@ export default {
});
if (code === 0) {
console.log('data----de', data)
this.dataForm = { ...data, houseType: data.houseType == '1' ? '自有' : '租住' }
console.log("data----de", data);
this.dataForm = {
...data,
houseType: data.houseType == "1" ? "自有" : "租住",
};
// this.getTableData();
this.formShow = true;
} else {
@ -421,17 +515,17 @@ export default {
}
},
async handleEdit (rowIndex) {
async handleEdit(rowIndex) {
this.formShow = true;
await nextTick();
this.$refs.eleEditForm.initForm("edit", this.tableData[rowIndex]);
},
handleEditSuccess () {
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
async handleDel (rowData, rowIndex) {
async handleDel(rowData, rowIndex) {
console.log(rowData, rowIndex);
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
@ -448,19 +542,17 @@ export default {
this.$message.success("操作失败!");
}
},
async getcommunityList () {
const url =
"/gov/org/agency/community-list";
async getcommunityList() {
const url = "/gov/org/agency/community-list";
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.communityList = data
this.communityList = data;
} else {
}
},
async getTableData () {
const url =
"/epmetuser/icresicollect/list";
async getTableData() {
const url = "/epmetuser/icresicollect/list";
const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
@ -470,47 +562,51 @@ export default {
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
let _i = 0
let arr = []
this.spanIndex = data.list && data.list.map((item, index) => {
if (index == 0) _i = 0
else _i = _i + data.list[index - 1].list.length
arr.push(_i)
console.log('_i-----', _i, arr)
// if (index === data.list.length - 1) firstIndex = _i - item.list.length
return {
firstIndex: _i,
len: item.list.length
}
})
this.tableData = data.list && this.formatArr(data.list)
console.log('tableData----0', this.spanIndex)
let _i = 0;
let arr = [];
this.spanIndex =
data.list &&
data.list.map((item, index) => {
if (index == 0) _i = 0;
else _i = _i + data.list[index - 1].list.length;
arr.push(_i);
console.log("_i-----", _i, arr);
// if (index === data.list.length - 1) firstIndex = _i - item.list.length
return {
firstIndex: _i,
len: item.list.length,
};
});
this.tableData = data.list && this.formatArr(data.list);
console.log("tableData----0", this.spanIndex);
} else {
}
},
//
formatArr (arr) {
let res = []
formatArr(arr) {
let res = [];
let arr1 = arr.map((n, index) => {
return {
...n,
list: n.list.length > 0 ? n.list.map(i => {
return {
...n,
...i,
desc: index + 1,
list: []
}
}) : []
}
})
arr1.forEach(item => {
list:
n.list.length > 0
? n.list.map((i) => {
return {
...n,
...i,
desc: index + 1,
list: [],
};
})
: [],
};
});
arr1.forEach((item) => {
if (item.list && item.list.length > 0) {
res = res.concat(this.formatArr(item.list))
} else res.push(item)
})
return res
res = res.concat(this.formatArr(item.list));
} else res.push(item);
});
return res;
},
},
};

725
src/views/modules/communityParty/members/points.vue

@ -0,0 +1,725 @@
<template>
<div v-if="pageLoading" class="resi-container">
<el-card ref="searchCard" class="search-card">
<div class="">
<el-form ref="searchForm" :inline="true" :model="searchForm" size="small" label-width="100px" class="demo-form-inline">
<div>
<!-- <el-form-item label="所属党组织" prop="partyOrgId">
<el-cascader
v-model="partyOrgRange"
:options="optionsG"
:props="partyProps"
clearable
@change="handlePartyChange"></el-cascader>
</el-form-item> -->
<el-form-item label="姓名" prop="name">
<el-input v-model="searchForm.name" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="searchForm.mobile" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="身份证" prop="idCard">
<el-input v-model="searchForm.idCard" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="审核状态" prop="status">
<el-select v-model="searchForm.status" filterable :disabled="disabled" placeholder="请选择" class="input-width" clearable>
<el-option
v-for="item in zwList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<el-form-item label="申请时间"
prop="startTime">
<el-date-picker v-model="timeRange"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
@change="handleTimeChange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="diy-button--search" size="small" @click="handleSearch">查询</el-button>
<el-button class="diy-button--reset" size="small" @click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
<el-card class="resi-card-table">
<!-- <div class="resi-row-btn">
<el-button class="diy-button--add" size="small" @click="handleAdd">批量审核</el-button>
</div> -->
<el-table
:data="tableData"
row-key="id"
v-loading="tableLoading"
border
:height="tableHeight"
style="width: 100%"
class="resi-table"
@select="handleSelection"
>
<!-- <el-table-column type="selection" align="center" width="50">
</el-table-column> -->
<el-table-column label="序号" type="index" align="center" width="50">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
align="center"
width="100"
/>
<el-table-column
prop="gender"
label="性别"
align="center"
width="100"
/>
<el-table-column
prop="idCard"
label="身份证号"
align="center"
min-width="180"
/>
<el-table-column
prop="mobile"
label="手机号"
align="center"
min-width="160"
/>
<el-table-column
prop="gridName"
label="所在网格"
align="center"
min-width="160"
show-overflow-tooltip
/>
<el-table-column
prop="title"
label="标题"
align="center"
show-overflow-tooltip
min-width="180"
/>
<el-table-column
prop="ruleName"
label="类别"
align="center"
min-width="160"
/>
<el-table-column
prop="createdTime"
label="申请时间"
align="center"
width="160"
/>
<el-table-column
prop="status"
label="审核状态"
align="center"
show-overflow-tooltip
width="100"
>
<template slot-scope="scope">
<span v-if="scope.row.status == 0">待审核</span>
<span v-else-if="scope.row.status == 2">已通过</span>
<span v-else-if="scope.row.status == 1">已驳回</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button
@click="handleLook(scope.row)"
type="text"
size="small"
class="btn-color-look"
>查看</el-button
>
<el-button
v-if="scope.row.status == 0"
@click="handleEdit(scope.row, 'edit')"
type="text"
size="small"
class="btn-color-edit"
>审核</el-button
>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</el-card>
<el-dialog title="审核信息" :visible.sync="dialogFormVisible">
<template v-if="!isBatch">
<div class="d-title">{{ detailInfo.title }}</div>
<div class="d-desc">{{ detailInfo.statement }}</div>
<div class="input-width1" style="display: flex;">
<el-image
v-for="item in detailInfo.annexList"
:key="item"
style="width: 100px; height: 100px; margin-right: 10px;"
:src="item"
:preview-src-list="detailInfo.annexList">
</el-image>
</div>
<div class="d-tips">申请人{{ detailInfo.showName }}</div>
<div class="d-tips">申请时间{{ detailInfo.createdTime }}</div>
<el-divider></el-divider>
</template>
<div class=""></div>
<el-form :model="form">
<el-form-item label="申请类别:" :label-width="'100px'">
<span>{{ detailInfo.ruleName }}</span>
</el-form-item>
<el-form-item label="申请积分:" :label-width="'100px'">
<span>{{ detailInfo.pointValue }}</span>
</el-form-item>
<el-form-item label="审核状态:" prop="status" :label-width="'100px'">
<el-select v-model="form.status" placeholder="请选择" :disabled="disabled" class="input-width">
<el-option
v-for="item in zwLists"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:" prop="remark" :label-width="'100px'">
<el-input v-model="form.remark" type="textarea" :disabled="disabled" autocomplete="off" class="input-width"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handlerCancle"> </el-button>
<el-button v-if="!disabled" type="primary" @click="handleSubmit"> </el-button>
</div>
</el-dialog>
<el-dialog title="详情" :visible.sync="dialogVisible" width="800px">
<el-form :model="detailInfo" inline>
<div>
<el-form-item label="所属网格:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.gridName}}</div>
</el-form-item>
<el-form-item label="姓名:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.name}}</div>
</el-form-item>
</div>
<div>
<!-- <el-form-item label="性别" prop="remark" :label-width="'100px'">
<el-input v-model="form.remark" autocomplete="off" class="input-width"></el-input>
</el-form-item> -->
<el-form-item label="手机号:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.mobile}}</div>
</el-form-item>
<el-form-item label="身份证:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.idCard}}</div>
</el-form-item>
</div>
<div>
<el-form-item label="积分类别:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.ruleName}}</div>
</el-form-item>
<el-form-item label="积分分值:" prop="status" :label-width="'100px'">
<div class="input-width1">{{detailInfo.pointValue}}</div>
</el-form-item>
</div>
<div>
<el-form-item label="标题:" prop="status" :label-width="'100px'">
<div class="input-width1">{{detailInfo.title}}</div>
</el-form-item>
<el-form-item label="内容:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.statement}}</div>
</el-form-item>
</div>
<el-form-item label="附件:" :label-width="'100px'">
<div class="input-width1" style="display: flex;">
<el-image
v-for="item in detailInfo.annexList"
:key="item"
style="width: 100px; height: 100px; margin-right: 10px;"
:src="item"
:preview-src-list="detailInfo.annexList">
</el-image>
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handlerCancle">关闭</el-button>
<!-- <el-button type="primary" @click="handleSubmit"> </el-button> -->
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data() {
return {
dialogVisible: false,
dialogFormVisible: false,
tableLoading: false,
disabled: false,
pageLoading: false,
isBatch: false,
currentPage: 1,
pageSize: 20,
total: null,
tableData: [],
searchH: 0,
addType: 'add',
optionsG: [],
zwLists: [
{
label: '通过',
value: '2'
},
{
label: '驳回',
value: '1'
}
],
zwList: [
{
label: '待审核',
value: '0'
},
{
label: '已通过',
value: '2'
},
{
label: '已驳回',
value: '1'
}
],
selectionList: [],
tempList: [],
partyOrgRange: [],
timeRange: [],
customerId: '',
searchForm: {
// partyOrgId: '',
mobile: '',
idCard: '',
name: '',
status: '',
startTime: '',
endTime: '',
categoryCode: 'party_building'
},
form: {
ids: [],
status: '2',
remark: ''
},
detailInfo: {},
partyProps: {
label: 'partyOrgName',
value: 'id',
checkStrictly: true
}
}
},
computed: {
...mapGetters(['clientHeight', 'iframeHeight']),
tableHeight() {
const h = this.clientHeight - this.searchH - 280 + this.iframeHeigh
const _h = this.clientHeight - 280 - this.searchH
return this.$store.state.inIframe ? h : _h
}
},
async created() {
this.customerId = localStorage.getItem('customerId')
this.getTableData()
this.getGridList('query')
this.pageLoading = true
},
mounted() {
this.$nextTick(() => {
this.searchH = this.$refs.searchCard.$el.offsetHeight
console.log('tableHeight', this.tableHeight)
})
},
methods: {
handleSelection(val) {
this.selectionList = [...val]
},
handleSizeChange(val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.getTableData()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
this.currentPage = val
if (this.selectionList.length > 0 && val !== 1) {
this.tempList = [...this.tempList, ...this.selectionList]
}
this.getTableData()
},
handlePartyChange(val) {
console.log('val------pp', val)
this.searchForm.partyOrgId = val[val.length - 1]
},
handleFilterSpan(row, item) {
let _val = ''
if (item.options && item.options.length > 0) {
item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label
})
}
return _val || row[item.columnName]
},
handleTimeChange (val) {
if (val.length > 0) {
this.searchForm.startTime = val[0]
this.searchForm.endTime = val[1]
} else {
this.searchForm.startTime = ''
this.searchForm.endTime = ''
}
},
handleDelimg(item, index) {
this.form.imageList.splice(index, 1)
},
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
this.getTableData()
},
resetForm(formName) {
this.timeRange = []
this.searchForm.startTime = ''
this.searchForm.endTime = ''
this.$refs[formName].resetFields()
this.handleSearch()
},
handleAdd() {
if (this.selectionList.length == 0) return this.$message.warning('请选择数据')
this.dialogFormVisible = true
},
handlerCancle() {
this.detailInfo = {}
this.selectionList = []
this.tempList = []
this.disabled = false
this.form = {
ids: [],
status: '2',
remark: ''
}
this.dialogFormVisible = false
this.dialogVisible = false
},
async handleLook(row) {
this.disabled = true
this.isBatch = false
await this.getDetail(row.id)
this.dialogFormVisible = true
},
async handleEdit(row, addType) {
this.form.ids = [row.id]
this.isBatch = false
// this.detailInfo = { ...row }
await this.getDetail(row.id)
this.dialogFormVisible = true
},
handleDel(row) {
let params = {
ids: [row.id]
}
console.log('row1', row)
this.$http
.post('/resi/partymember/icPartyMember/delete', [row.id])
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('删除成功')
this.getTableData()
}
})
.catch((err) => {
return this.$message.error('网络错误')
})
},
async handleSubmit() {
if (this.form.ids.length == 0) {
if (this.tempList.length > 0) this.form.ids = Array.from(new Set(this.tempList.map(item => item.id)))
else this.form.ids = Array.from(new Set(this.selectionList.map(item => item.id)))
}
this.$http
.post('/point/apply/examine/submit', this.form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('操作成功')
this.handlerCancle()
this.getTableData()
}
})
.catch((err) => {
return this.$message.error('网络错误')
})
},
async getDetail(id) {
let params = {
id,
}
this.$http
.post(`/point/apply/detail/${id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.detailInfo = { ...res.data }
if (this.disabled) {
this.form.status = res.data.status
this.form.remark = res.data.remark
}
}
})
.catch((err) => {
console.log('row4', err)
return this.$message.error('网络错误')
})
},
async getGridList(type, agencyId) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.get('/resi/partymember/icPartyOrg/getSearchTreelist', { params: {agencyId: agencyId || user.agencyId} })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = this.deepArrTOnull(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
deepArrTOnull(arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
}
})
return a
},
async getTableData() {
this.tableLoading = true
const { user } = await this.$store.state
let params = {
...this.searchForm,
agencyId: user.agencyId,
pageNo: this.currentPage,
pageSize: this.pageSize
}
await this.$http
.post('/point/apply/listall', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data.list
this.total = res.data.total
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.tableLoading = false
}
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.input-width {
width: 200px;
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.d-title {
text-align: center;
font-size: 18px;
}
.d-desc {
margin: 10px 0;
// font-size: ;
text-indent: 2em;
line-height: 16px;
}
.d-tips {
color: #999;
margin-top: 10px;
}
</style>
<style lang="scss" scoped>
.resi-row-btn {
display: flex;
margin-bottom: 13px;
::v-deep .el-button {
// margin-left: 10px;
border: 0;
}
::v-deep .el-select {
margin-right: 10px;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button {
margin-left: 10px;
border: 0;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button--warning {
background: rgba(254, 179, 73, 1);
}
.el-button--danger {
background: rgba(254, 98, 82, 1);
}
}
.avatar-uploader {
::v-deep
.el-upload {
cursor: pointer;
position: relative;
overflow: hidden;
}
.el-upload:hover {
border-color: #409EFF;
}
.avatar {
width: 100px;
height: 100px;
display: block;
}
.avatar-uploader-icon {
border: 1px dashed #d9d9d9;
border-radius: 6px;
font-size: 28px;
color: #8c939d;
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
.input-width1 {
width: 250px;
}
</style>

14
src/views/modules/communityParty/regionalParty/activitysForm.vue

@ -376,11 +376,21 @@ export default {
})
},
dormatHtml(content) {
let c = ''
if (content.indexOf('DOCTYPE') != -1) {
c = content.slice(45, -16);
}
console.log('content', typeof content)
return c || content
},
async addActivity () {
let url = '/heart/icpartyactivity/save'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/save"
if (this.formData.content) {
this.formData.content = this.dormatHtml(this.formData.content)
}
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {

728
src/views/modules/communityService/measure/points.vue

@ -0,0 +1,728 @@
<template>
<div v-if="pageLoading" class="resi-container">
<el-card ref="searchCard" class="search-card">
<div class="">
<el-form ref="searchForm" :inline="true" :model="searchForm" size="small" label-width="100px" class="demo-form-inline">
<div>
<!-- <el-form-item label="所属党组织" prop="partyOrgId">
<el-cascader
v-model="partyOrgRange"
:options="optionsG"
:props="partyProps"
clearable
@change="handlePartyChange"></el-cascader>
</el-form-item> -->
<el-form-item label="姓名" prop="name">
<el-input v-model="searchForm.name" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="searchForm.mobile" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="身份证" prop="idCard">
<el-input v-model="searchForm.idCard" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="审核状态" prop="status">
<el-select v-model="searchForm.status" filterable :disabled="disabled" placeholder="请选择" class="input-width" clearable>
<el-option
v-for="item in zwList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<el-form-item label="申请时间"
prop="startTime">
<el-date-picker v-model="timeRange"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
@change="handleTimeChange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="diy-button--search" size="small" @click="handleSearch">查询</el-button>
<el-button class="diy-button--reset" size="small" @click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
<el-card class="resi-card-table">
<!-- <div class="resi-row-btn">
<el-button class="diy-button--add" size="small" @click="handleAdd">批量审核</el-button>
</div> -->
<el-table
:data="tableData"
row-key="id"
v-loading="tableLoading"
border
:height="tableHeight"
style="width: 100%"
class="resi-table"
@select="handleSelection"
>
<!-- <el-table-column type="selection" align="center" width="50">
</el-table-column> -->
<el-table-column label="序号" type="index" align="center" width="50">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
align="center"
width="100"
/>
<el-table-column
prop="gender"
label="性别"
align="center"
width="100"
/>
<el-table-column
prop="idCard"
label="身份证号"
align="center"
min-width="180"
/>
<el-table-column
prop="mobile"
label="手机号"
align="center"
min-width="160"
/>
<el-table-column
prop="gridName"
label="所在网格"
align="center"
min-width="160"
show-overflow-tooltip
/>
<el-table-column
prop="title"
label="标题"
align="center"
show-overflow-tooltip
min-width="180"
/>
<el-table-column
prop="ruleName"
label="类别"
align="center"
min-width="160"
/>
<el-table-column
prop="createdTime"
label="申请时间"
align="center"
width="160"
/>
<el-table-column
prop="status"
label="审核状态"
align="center"
show-overflow-tooltip
width="100"
>
<template slot-scope="scope">
<span v-if="scope.row.status == 0">待审核</span>
<span v-else-if="scope.row.status == 2">已通过</span>
<span v-else-if="scope.row.status == 1">已驳回</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button
@click="handleLook(scope.row)"
type="text"
size="small"
class="btn-color-look"
>查看</el-button
>
<el-button
v-if="scope.row.status == 0"
@click="handleEdit(scope.row, 'edit')"
type="text"
size="small"
class="btn-color-edit"
>审核</el-button
>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</el-card>
<el-dialog title="审核信息" :visible.sync="dialogFormVisible">
<template v-if="!isBatch">
<div class="d-title">{{ detailInfo.title }}</div>
<div class="d-desc">{{ detailInfo.statement }}</div>
<div class="input-width1" style="display: flex;">
<el-image
v-for="item in detailInfo.annexList"
:key="item"
style="width: 100px; height: 100px; margin-right: 10px;"
:src="item"
:preview-src-list="detailInfo.annexList">
</el-image>
</div>
<div class="d-tips">申请人{{ detailInfo.showName }}</div>
<div class="d-tips">申请时间{{ detailInfo.createdTime }}</div>
<el-divider></el-divider>
</template>
<div class=""></div>
<el-form :model="form">
<el-form-item label="申请类别:" :label-width="'100px'">
<span>{{ detailInfo.ruleName }}</span>
</el-form-item>
<el-form-item label="申请积分:" :label-width="'100px'">
<span>{{ detailInfo.pointValue }}</span>
</el-form-item>
<el-form-item label="审核状态:" prop="status" :label-width="'100px'">
<el-select v-model="form.status" placeholder="请选择" :disabled="disabled" class="input-width">
<el-option
v-for="item in zwLists"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:" prop="remark" :label-width="'100px'">
<el-input v-model="form.remark" type="textarea" :disabled="disabled" autocomplete="off" class="input-width"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handlerCancle"> </el-button>
<el-button v-if="!disabled" type="primary" @click="handleSubmit"> </el-button>
</div>
</el-dialog>
<el-dialog title="详情" :visible.sync="dialogVisible" width="800px">
<el-form :model="detailInfo" inline>
<div>
<el-form-item label="所属网格:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.gridName}}</div>
</el-form-item>
<el-form-item label="姓名:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.name}}</div>
</el-form-item>
</div>
<div>
<!-- <el-form-item label="性别" prop="remark" :label-width="'100px'">
<el-input v-model="form.remark" autocomplete="off" class="input-width"></el-input>
</el-form-item> -->
<el-form-item label="手机号:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.mobile}}</div>
</el-form-item>
<el-form-item label="身份证:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.idCard}}</div>
</el-form-item>
</div>
<div>
<el-form-item label="积分类别:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.ruleName}}</div>
</el-form-item>
<el-form-item label="积分分值:" prop="status" :label-width="'100px'">
<div class="input-width1">{{detailInfo.pointValue}}</div>
</el-form-item>
</div>
<div>
<el-form-item label="标题:" prop="status" :label-width="'100px'">
<div class="input-width1">{{detailInfo.title}}</div>
</el-form-item>
<el-form-item label="内容:" :label-width="'100px'">
<div class="input-width1">{{detailInfo.statement}}</div>
</el-form-item>
</div>
<el-form-item label="附件:" :label-width="'100px'">
<div class="input-width1" style="display: flex;">
<el-image
v-for="item in detailInfo.annexList"
:key="item"
style="width: 100px; height: 100px; margin-right: 10px;"
:src="item"
:preview-src-list="detailInfo.annexList">
</el-image>
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handlerCancle">关闭</el-button>
<!-- <el-button type="primary" @click="handleSubmit"> </el-button> -->
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data() {
return {
dialogVisible: false,
dialogFormVisible: false,
tableLoading: false,
disabled: false,
pageLoading: false,
currentPage: 1,
pageSize: 20,
total: null,
tableData: [],
searchH: 0,
addType: 'add',
optionsG: [],
zwLists: [
{
label: '通过',
value: '2'
},
{
label: '驳回',
value: '1'
}
],
zwList: [
{
label: '待审核',
value: '0'
},
{
label: '已通过',
value: '2'
},
{
label: '已驳回',
value: '1'
}
],
selectionList: [],
tempList: [],
partyOrgRange: [],
timeRange: [],
customerId: '',
isBatch: false,
searchForm: {
// partyOrgId: '',
mobile: '',
idCard: '',
name: '',
status: '',
startTime: '',
endTime: '',
categoryCode: 'moral_education'
},
form: {
ids: [],
status: '2',
remark: ''
},
detailInfo: {},
partyProps: {
label: 'partyOrgName',
value: 'id',
checkStrictly: true
}
}
},
computed: {
...mapGetters(['clientHeight', 'iframeHeight']),
tableHeight() {
const h = this.clientHeight - this.searchH - 280 + this.iframeHeigh
const _h = this.clientHeight - 280 - this.searchH
return this.$store.state.inIframe ? h : _h
}
},
async created() {
this.customerId = localStorage.getItem('customerId')
this.getTableData()
this.getGridList('query')
this.pageLoading = true
},
mounted() {
this.$nextTick(() => {
this.searchH = this.$refs.searchCard.$el.offsetHeight
console.log('tableHeight', this.tableHeight)
})
},
methods: {
handleSelection(val) {
this.selectionList = [...val]
},
handleSizeChange(val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.getTableData()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
this.currentPage = val
if (this.selectionList.length > 0 && val !== 1) {
this.tempList = [...this.tempList, ...this.selectionList]
}
this.getTableData()
},
handlePartyChange(val) {
console.log('val------pp', val)
this.searchForm.partyOrgId = val[val.length - 1]
},
handleFilterSpan(row, item) {
let _val = ''
if (item.options && item.options.length > 0) {
item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label
})
}
return _val || row[item.columnName]
},
handleTimeChange (val) {
if (val.length > 0) {
this.searchForm.startTime = val[0]
this.searchForm.endTime = val[1]
} else {
this.searchForm.startTime = ''
this.searchForm.endTime = ''
}
},
handleDelimg(item, index) {
this.form.imageList.splice(index, 1)
},
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
this.getTableData()
},
resetForm(formName) {
this.timeRange = []
this.searchForm.startTime = ''
this.searchForm.endTime = ''
this.$refs[formName].resetFields()
this.handleSearch()
},
handleAdd() {
if (this.selectionList.length == 0) return this.$message.warning('请选择数据')
this.isBatch = true
this.dialogFormVisible = true
},
handlerCancle() {
this.detailInfo = {}
this.selectionList = []
this.tempList = []
this.disabled = false
this.isBatch = false
this.form = {
ids: [],
status: '2',
remark: ''
}
this.dialogFormVisible = false
this.dialogVisible = false
},
async handleLook(row) {
this.disabled = true
this.isBatch = false
await this.getDetail(row.id)
this.dialogFormVisible = true
},
async handleEdit(row, addType) {
this.form.ids = [row.id]
this.isBatch = false
// this.detailInfo = { ...row }
await this.getDetail(row.id)
this.dialogFormVisible = true
},
handleDel(row) {
let params = {
ids: [row.id]
}
console.log('row1', row)
this.$http
.post('/resi/partymember/icPartyMember/delete', [row.id])
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('删除成功')
this.getTableData()
}
})
.catch((err) => {
return this.$message.error('网络错误')
})
},
async handleSubmit() {
if (this.form.ids.length == 0) {
if (this.tempList.length > 0) this.form.ids = Array.from(new Set(this.tempList.map(item => item.id)))
else this.form.ids = Array.from(new Set(this.selectionList.map(item => item.id)))
}
this.$http
.post('/point/apply/examine/submit', this.form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('操作成功')
this.handlerCancle()
this.getTableData()
}
})
.catch((err) => {
return this.$message.error('网络错误')
})
},
async getDetail(id) {
let params = {
id,
}
this.$http
.post(`/point/apply/detail/${id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.detailInfo = { ...res.data }
if (this.disabled) {
this.form.status = res.data.status
this.form.remark = res.data.remark
}
// this.dialogVisible = true
}
})
.catch((err) => {
console.log('row4', err)
return this.$message.error('网络错误')
})
},
async getGridList(type, agencyId) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.get('/resi/partymember/icPartyOrg/getSearchTreelist', { params: {agencyId: agencyId || user.agencyId} })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = this.deepArrTOnull(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
deepArrTOnull(arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
}
})
return a
},
async getTableData() {
this.tableLoading = true
const { user } = await this.$store.state
let params = {
...this.searchForm,
agencyId: user.agencyId,
pageNo: this.currentPage,
pageSize: this.pageSize
}
await this.$http
.post('/point/apply/listall', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data.list
this.total = res.data.total
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.tableLoading = false
}
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.input-width {
width: 200px;
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.d-title {
text-align: center;
font-size: 18px;
}
.d-desc {
margin: 10px 0;
// font-size: ;
text-indent: 2em;
line-height: 16px;
}
.d-tips {
color: #999;
margin-top: 10px;
}
</style>
<style lang="scss" scoped>
.resi-row-btn {
display: flex;
margin-bottom: 13px;
::v-deep .el-button {
// margin-left: 10px;
border: 0;
}
::v-deep .el-select {
margin-right: 10px;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button {
margin-left: 10px;
border: 0;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button--warning {
background: rgba(254, 179, 73, 1);
}
.el-button--danger {
background: rgba(254, 98, 82, 1);
}
}
.avatar-uploader {
::v-deep
.el-upload {
cursor: pointer;
position: relative;
overflow: hidden;
}
.el-upload:hover {
border-color: #409EFF;
}
.avatar {
width: 100px;
height: 100px;
display: block;
}
.avatar-uploader-icon {
border: 1px dashed #d9d9d9;
border-radius: 6px;
font-size: 28px;
color: #8c939d;
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
.input-width1 {
width: 250px;
}
</style>

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

@ -332,11 +332,19 @@ export default {
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
},
saveForm () {
this.dataForm.moduleList = []
this.moduleArray.forEach(element => {
if (element.moduleContent) {
element.moduleContent = this.dormatHtml(element.moduleContent)
this.dataForm.moduleList.push(element)
}
});

517
src/views/modules/workSys/pointAditive/rule.vue

@ -0,0 +1,517 @@
<template>
<div v-if="pageLoading"
class="resi-container">
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button class="diy-button--add"
size="small"
@click="handleAdd('1', 'add')">添加积分类别</el-button>
</div>
<el-table :data="tableData"
row-key="id"
v-loading="tableLoading"
:height="tableHeight"
style="width: 100%"
class="resi-table"
border>
<el-table-column v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
:align="item.align">
</el-table-column>
<el-table-column label="操作"
align="center"
width="200">
<template slot-scope="scope">
<el-button v-if="scope.row.pid == 0"
@click="handleAdd('2', 'add', scope.row.id)"
type="text"
size="small"
class="btn-color-1j">添加二级分类</el-button>
<el-button v-if="scope.row.pid != 0 && scope.row.categoryName"
@click="handleAdd('3', 'add', scope.row.id, scope.row.pid, scope.row.categoryName)"
type="text"
size="small"
class="btn-color-2j">添加积分规则</el-button>
<el-button v-if="scope.row.pid != 0"
@click="handleEdit(scope.row, 'edit', scope.row.categoryName ? '4' : scope.row.ruleName ? '5' : '1')"
type="text"
size="small"
class="btn-color-edit">修改</el-button>
<el-button v-if="scope.row.pid != 0"
@click="handleDel(scope.row)"
type="text"
size="small"
class="btn-color-del">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :title="addLevel == '1' ? '添加积分分类' : addLevel == '2' ? '添加二级分类' : addLevel == '3' ? '添加积分规则' : addLevel == '4' ? '修改二级分类' : addLevel == '5' ? '修改积分规则' : ''"
:visible.sync="dialogVisible"
width="40%"
append-to-body
:close-on-click-modal="false"
:before-close="handlerCancle">
<el-form label-width="100px"
:model="form"
:rules="rules"
ref="ruleForm">
<el-form-item label="上级分类"
prop="pid">
<el-select class="item_width_1"
v-model="form.pid"
placeholder="请选择"
size="small"
:disabled="addLevel == '2' || addLevel == '3' || addLevel == '4' || addLevel == '5' ? true : false"
clearable>
<el-option v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="类别名称"
prop="categoryName">
<el-input :disabled="addLevel == '3' || addLevel == '5' ? true : false" v-model="form.categoryName"
size="small"
style="width: 180px;"></el-input>
</el-form-item>
<el-form-item v-if="addLevel == '3' || addLevel == '5'" label="规则名称"
prop="ruleName">
<el-input v-model="form.ruleName"
size="small"
style="width: 180px;"></el-input>
</el-form-item>
<el-form-item v-if="addLevel == '3' || addLevel == '5'"
label="加减分值"
prop="pointValue">
<el-input-number v-model="form.pointValue"
size="small"
label="描述文字"></el-input-number>
(减分请输入负数)
</el-form-item>
<el-form-item v-if="addLevel == '3' || addLevel == '5'"
label="居民端积分申请"
prop="applyFlag"
label-width="140px">
<el-radio v-model="form.applyFlag" label="0">允许申请</el-radio>
<el-radio v-model="form.applyFlag" label="1">不允许申请</el-radio>
</el-form-item>
</el-form>
<div class="resi-btns">
<el-button size="small"
@click="handlerCancle">取消</el-button>
<el-button type="primary"
size="small"
:loading="btnLoading"
@click="handleSUbmit">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data () {
return {
tableLoading: false,
btnLoading: false,
pageLoading: false,
dialogVisible: false,
tableData: [],
sHeight: 0,
addLevel: '1',
addType: 'add',
tableHeader: [
{
label: '积分类别',
align: 'left',
columnName: 'categoryName'
}, {
label: '积分规则',
columnName: 'ruleName',
align: 'center'
}
],
typeList: [], //
form: { //
categoryName: '', //
pid: '', // ID
newPid: '', // pid
ruleName: '', //
pointValue: '', //
applyFlag: '0' // 01
},
ruleform:{}, // // form
typeform: {}, //
rules: {
pid: [{ required: true, message: '请选择分类', trigger: 'blur' }],
categoryName: [{ required: true, message: '类别名称不能为空', trigger: 'blur' }],
ruleName: [{ required: true, message: '规则名称不能为空', trigger: 'blur' }],
pointValue: [{ required: true, message: '加减分值不能为空', trigger: 'blur' }],
applyFlag: [{ required: true, message: '请选择积分申请', trigger: 'blur' }]
}
}
},
computed: {
tableHeight () {
const h = this.clientHeight - this.sHeight + this.iframeHeigh
const _h = this.clientHeight - this.sHeight
return this.$store.state.inIframe ? h : _h
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
async created () {
this.getTableData()
this.pageLoading = true
},
mounted () {
this.$nextTick(() => {
this.sHeight = 210
})
},
methods: {
//
handleAdd (type, addType, id, pid, categoryName) {
if (type === '1') {
this.form.pid = ''
this.form.categoryName = ''
}
this.addLevel = type
this.addType = addType
if (type == '2') {
this.form.pid = id
this.form.categoryName = ''
}
if (type == '3') {
this.form.pid = pid
this.form.newPid = id
this.form.categoryName = categoryName
}
this.dialogVisible = true
},
handlerCancle () {
this.dialogVisible = false
},
//
async handleEdit (row, addType, level) {
console.log(addType, level)
let url = ''
if (level === '4') {
url = `/point/additiverule/categorydetail/${row.id}`
} else if(level === '5') {
url = `/point/additiverule/ruledetail/${row.id}`
await this.$http.post(`/point/additiverule/categorydetail/${row.pid}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.form.pid = res.data.pid //
this.form.categoryName = res.data.categoryName //
this.form.newPid = res.data.id // id
}
})
}
this.addLevel = level
this.addType = addType
this.dialogVisible = true
await this.$http.post(url).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
if (this.addLevel === '4' ) {
this.form.pid = res.data.pid //
this.form.categoryName = res.data.categoryName //
this.form.newPid = res.data.id // id
this.typeform = { ...res.data }
} else {
this.form.applyFlag = res.data.applyFlag //
this.form.ruleName = res.data.ruleName
this.form.pointValue = res.data.pointValue
this.ruleform = { ...res.data }
}
}
})
},
//
async addLevelFirst () {
const _form = {
pid: this.form.pid, // ID
categoryName: this.form.categoryName //
}
await this.$http
.post('/point/additiverule/addcategory', _form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.dialogVisible = false
this.getTableData()
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.btnLoading = false
},
//
async addLevelChild () {
const _form = {
ruleName: this.form.ruleName,
pid: this.form.newPid,
pointValue: this.form.pointValue,
applyFlag: this.form.applyFlag
}
await this.$http
.post('/point/additiverule/addrule', _form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.dialogVisible = false
this.getTableData()
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.form.ruleName = ''
this.form.pointValue = ''
this.btnLoading = false
},
//
handleSUbmit () {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
this.btnLoading = true
if (this.addType == 'add') {
if (this.addLevel == '1' || this.addLevel == '2') this.addLevelFirst()
else this.addLevelChild()
} else this.editCate()
} else {
console.log('error submit!!');
return false;
}
});
},
//
async editCate () {
if (this.addLevel === '4' ) { //
this.typeform.categoryName = this.form.categoryName
this.typeform.type = 'category'
} else {
this.ruleform.ruleName = this.form.ruleName
this.ruleform.pointValue = this.form.pointValue
this.ruleform.applyFlag = this.form.applyFlag
this.ruleform.type = 'rule'
}
console.log(JSON.stringify(this.ruleform))
await this.$http
.post('/point/additiverule/modify', this.addLevel==='4' ? this.typeform : this.ruleform)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.dialogVisible = false
this.getTableData()
this.$message.success('保存成功')
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.btnLoading = false
},
//
handleDel (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
let params = [row.id]
console.log('row1', row)
this.$http.post('/point/additiverule/delete', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('row3', row)
this.$message.success('删除成功')
this.getTableData()
}
})
.catch((err) => {
console.log('row4', err)
return this.$message.error('网络错误')
})
}).catch(err => {
console.log(err)
});
},
//
async getTableData () {
this.typeList = []
this.tableData = []
this.tableLoading = true
let params = {}
await this.$http.post('/point/additiverule/list4tree', params).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
let list = []
if (res.data.length > 0) {
res.data.forEach(element => { //
if (element.pid === '0') {
element.children = []
list.push(element)
this.typeList.push({ //
value: element.id,
label: element.categoryName
})
}
});
}
if (list.length > 0) { //
res.data.forEach(element => {
if (element.pid) {
list.forEach((item, index) => {
if (element.pid === item.id) {
element.children = []
list[index].children.push(element)
}
});
}
});
}
if (list.length > 0) { //
res.data.forEach(element => {
if (element.pid) {
list.forEach((item, index) => {
if (item.children.length > 0 ) {
item.children.forEach((itemC, indexC) => {
if (element.pid === itemC.id) {
list[index].children[indexC].children.push(element)
}
});
}
});
}
});
}
this.tableData = list.map((item, index) => {
return {
...item,
index: index + 1,
children: item.children.map(n => {
return {
...n
}
})
}
})
}
})
this.tableLoading = false
}
}
}
</script>
<style lang="scss" scoped>
.resi-container .resi-card-table {
::v-deep .el-table {
th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
}
.cell {
span:nth-of-type(3) {
display: inline-block;
width: 90%;
word-break: break-all;
}
}
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-2j {
margin-left: 10px;
color: #fdaf30;
}
::v-deep .btn-color-1j {
margin-left: 10px;
color: #3cb357;
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
</style>
<style lang="scss" scoped>
.resi-row-btn {
display: flex;
margin-bottom: 13px;
::v-deep .el-button {
// margin-left: 10px;
border: 0;
}
::v-deep .el-select {
margin-right: 10px;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
}
.avatar-uploader {
::v-deep .el-upload {
cursor: pointer;
position: relative;
overflow: hidden;
}
.el-upload:hover {
border-color: #409eff;
}
.avatar {
width: 70px;
height: 70px;
display: block;
}
.avatar-uploader-icon {
border: 1px dashed #d9d9d9;
border-radius: 6px;
font-size: 28px;
color: #8c939d;
width: 70px;
height: 70px;
line-height: 70px;
text-align: center;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
</style>
Loading…
Cancel
Save