Browse Source

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

shibei_master
dai 4 years ago
parent
commit
450525b9a8
  1. 143
      src/views/modules/base/resi.vue
  2. 4
      src/views/modules/communityParty/elegant/index.vue
  3. 2
      src/views/modules/communityService/dqfwzx/cpts/edit.vue
  4. 205
      src/views/modules/communityService/dqfwzx/cpts/order.vue
  5. 106
      src/views/modules/communityService/dqfwzx/cpts/orderList.vue
  6. 3
      src/views/modules/communityService/dqfwzx/index.vue
  7. 247
      src/views/modules/workSys/demandCate.vue

143
src/views/modules/base/resi.vue

@ -7,10 +7,12 @@
@search="handleSearch" />
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button
size="small"
<el-button size="small"
class="diy-button--add"
@click="handleAdd">新增</el-button>
<el-button class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载人口模板</el-button>
<el-upload ref="upload"
class="upload-demo"
action="uploadUlr"
@ -22,25 +24,20 @@
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-button
size="small"
<el-button size="small"
class="diy-button--delete"
:loading="importLoading">{{importBtnTitle}}</el-button>
</el-upload>
<el-button
size="small"
<el-button size="small"
class="diy-button--reset"
:loading="exportBtn"
@click="handleExport">{{exportBtnTitle}}</el-button>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
<el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载人口模板</el-button>
</div>
<el-table ref="ref_table" :data="tableData"
<el-table ref="ref_table"
:data="tableData"
v-loading="tableLoading"
border
style="width: 100%"
@ -49,8 +46,8 @@
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
fixed="left"
:selectable="checkSelect"
fixed="left"
:selectable="checkSelect"
width="55" />
<el-table-column label="序号"
type="index"
@ -67,7 +64,9 @@
:show-overflow-tooltip="true"
:width="item.itemType === 'radio' ? computedWidth(item.label) : 180">
<template slot-scope="scope">
<a v-if="item.columnName == 'NAME'" class="name-a" @click="handleLook(scope.row)">
<a v-if="item.columnName == 'NAME'"
class="name-a"
@click="handleLook(scope.row)">
{{ handleFilterSpan(scope.row, item) }}
</a>
<span v-else>{{ handleFilterSpan(scope.row, item) }}</span>
@ -85,13 +84,11 @@
<el-button @click="handleTransfer(scope.row)"
type="text"
size="small"
class="div-table-button--detail"
>调动</el-button>
class="div-table-button--detail">调动</el-button>
<el-button @click="handleChangeRecord(scope.row)"
type="text"
size="small"
class="div-table-button--detail"
>变更记录</el-button>
class="div-table-button--detail">变更记录</el-button>
<template v-if="filterEdit(scope.row.ORG_ID)">
<el-button @click="handleEdit(scope.row)"
type="text"
@ -111,25 +108,26 @@
<div class="div-flex">
<div class="div_del">
<el-checkbox :indeterminate="isIndeterminate"
v-model="selAllFlag"
:disabled="selAllFlagDisabled"
@change="handleSelectAll">全选</el-checkbox>
<el-button v-if="selection.length > 0" style="margin-left:15px"
type="danger"
size="small"
@click="deleteBatch">删除</el-button>
v-model="selAllFlag"
:disabled="selAllFlagDisabled"
@change="handleSelectAll">全选</el-checkbox>
<el-button v-if="selection.length > 0"
style="margin-left:15px"
type="danger"
size="small"
@click="deleteBatch">删除</el-button>
</div>
<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">
@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>
</div>
</el-card>
@ -143,31 +141,31 @@
:before-close="handlerCancle">
<div class="dialog-h-content scroll-h">
<resi-form v-if="dialogVisible"
ref="baseForm"
:fixed="true"
:form-list="formList"
@changegroup="handleChangeGroup" />
ref="baseForm"
:fixed="true"
:form-list="formList"
@changegroup="handleChangeGroup" />
<div v-if="dialogVisible"
class="resi-other">
class="resi-other">
<div class="resi-other-title">其他</div>
<div class="tabs-other-info">
<el-tabs v-model="activeName"
@tab-click="handleClick">
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId">
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId">
<resi-form :ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
:form-list="item.itemList" />
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
:form-list="item.itemList" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<div class="resi-btns">
<el-button size="small"
@click="handlerCancle">取消</el-button>
@ -188,32 +186,32 @@
:before-close="handlerEditCancle">
<div class="dialog-h-content scroll-h">
<edit-resi v-if="dialogEditVisible"
ref="baseForm"
:disabled="disabled"
:form-info="editForm"
:fixed="true"
:form-list="formList"
:agency-id="editAgencyId"
@changegroup="handleChangeGroup" />
ref="baseForm"
:disabled="disabled"
:form-info="editForm"
:fixed="true"
:form-list="formList"
:agency-id="editAgencyId"
@changegroup="handleChangeGroup" />
<div v-if="dialogEditVisible"
class="resi-other">
class="resi-other">
<div class="resi-other-title">其他</div>
<div class="tabs-other-info">
<el-tabs v-model="activeName"
@tab-click="handleClick">
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId">
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId">
<edit-resi :ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
:muti-list="item.mutiList"
:form-list="item.itemList"
:disabled="disabled"
:label-width="'140px'"
:agency-id="editAgencyId" />
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
:muti-list="item.mutiList"
:form-list="item.itemList"
:disabled="disabled"
:label-width="'140px'"
:agency-id="editAgencyId" />
</el-tab-pane>
</el-tabs>
</div>
@ -354,13 +352,13 @@ export default {
console.log('resiSearch', this.$refs.resiSearch.$el.offsetHeight)
this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px'
},
mounted() {
mounted () {
console.log('document.documentElement.clientWidth', document.documentElement.clientHeight)
},
methods: {
checkSelect (row, index) {
return row.isChecked
},
//
@ -486,12 +484,13 @@ export default {
},
async handleExportModule () {
let url = "/epmetuser/icresiuser/import/download-template"
let params = {}
await this.$http
.post(url, params)
.then(res => {
console.log('res----dddd', res)
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
@ -1015,7 +1014,7 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
// console.log('', res.data)
console.log('获取查询详情成功--sss', res)
this.searchList = res.data
res.data.forEach((item) => {
if (item.optionSourceType === 'remote') {

4
src/views/modules/communityParty/elegant/index.vue

@ -63,10 +63,10 @@
<el-button size="small" class="diy-button--delete" :loading="importLoading">{{importBtnTitle}}</el-button>
</el-upload>
<el-button class="diy-button--reset" size="small" :loading="exportBtn" @click="handleExport">{{ exportBtnTitle }}</el-button>
<el-button
<!-- <el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
@click="handleExportModule('room')">下载模板</el-button> -->
</div>
<el-table

2
src/views/modules/communityService/dqfwzx/cpts/edit.vue

@ -1,6 +1,6 @@
<template>
<div>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form"
:inline="true"
:model="dataForm"

205
src/views/modules/communityService/dqfwzx/cpts/order.vue

@ -1,36 +1,28 @@
<template>
<div>
<div>
<el-form
ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form"
>
<el-form-item
label="事项名称"
prop="matterName"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
v-model="info.matterName"
disabled
>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="事项名称"
prop="matterName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
v-model="info.matterName"
disabled>
</el-input>
</el-form-item>
<el-form-item
label="预约日期"
prop="appointmentDate"
label-width="150px"
style="display: block"
>
<el-form-item label="预约日期"
prop="appointmentDate"
label-width="150px"
style="display: block">
<!-- <el-date-picker
v-model="dataForm.appointmentDate"
placeholder="预约日期"
@ -38,98 +30,77 @@
:picker-options="dateOptions"
>
</el-date-picker> -->
<el-select v-model="dataForm.appointmentDate" placeholder="请选择">
<el-option
v-for="item in dateList"
:key="item"
:label="item"
:value="item"
>
</el-option
></el-select>
<el-select v-model="dataForm.appointmentDate"
placeholder="请选择">
<el-option v-for="item in dateList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item
v-if="timeList.length > 0"
label="预约时段"
prop="timeId"
label-width="150px"
style="display: block"
>
<el-form-item v-if="timeList.length > 0"
label="预约时段"
prop="timeId"
label-width="150px"
style="display: block">
<div style="margin-left: auto; width: 600px">
<el-checkbox
:label="item.timeId"
:key="item.timeId"
:disabled="!item.isAppointment"
v-for="(item, index) in timeList"
:checked="item.selected"
:value="item.selected"
@change="selectTime(index)"
@onChange="selectTime(index)"
>{{ item.time }}</el-checkbox
>
<el-checkbox :label="item.timeId"
:key="item.timeId"
:disabled="!item.isAppointment"
v-for="(item, index) in timeList"
:checked="item.selected"
:value="item.selected"
@change="selectTime(index)"
@onChange="selectTime(index)">{{ item.time }}</el-checkbox>
</div>
</el-form-item>
<el-form-item
label="预约人"
prop="appointmentName"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入预约人"
v-model="dataForm.appointmentName"
>
<el-form-item label="预约人"
prop="appointmentName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入预约人"
v-model="dataForm.appointmentName">
</el-input>
</el-form-item>
<el-form-item
label="联系方式"
prop="appointmentPhone"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入联系方式"
v-model="dataForm.appointmentPhone"
>
<el-form-item label="联系方式"
prop="appointmentPhone"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入联系方式"
v-model="dataForm.appointmentPhone">
</el-input>
</el-form-item>
<el-form-item
label="备注"
prop="remark"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过1000字"
v-model="dataForm.remark"
></el-input>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过1000字"
v-model="dataForm.remark"></el-input>
</el-form-item>
</el-form>
</div>
<div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button
v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
@ -155,7 +126,7 @@ var infoWindowList;
let loading; //
export default {
data() {
data () {
return {
formType: "add", // addeditdetail
@ -166,7 +137,7 @@ export default {
},
dateOptions: {
disabledDate(time) {
disabledDate (time) {
return (
time.getTime() < Date.now() - 3600 * 24 * 1 * 1000 ||
time.getTime() > Date.now() + 3600 * 24 * 6 * 1000
@ -188,7 +159,7 @@ export default {
},
components: {},
computed: {
dataRule() {
dataRule () {
return {
appointmentName: [
{ required: true, message: "预约人不能为空", trigger: "blur" },
@ -212,10 +183,10 @@ export default {
},
},
async mounted() {},
async mounted () { },
methods: {
async initForm(type, row, index) {
async initForm (type, row, index) {
this.$refs.ref_form.resetFields();
let item = row.matterList[index];
@ -226,7 +197,7 @@ export default {
}
},
selectTime(index) {
selectTime (index) {
// return console.log(index);
let list = deepClone(this.timeList);
if (!list[index].isAppointment) return false;
@ -302,7 +273,7 @@ export default {
return false;
},
async getDateList() {
async getDateList () {
let url = "/gov/org/icpartyservicecenter/appointmenttime";
const {
@ -322,7 +293,7 @@ export default {
}
},
async getTimeList() {
async getTimeList () {
let url = "/gov/org/icpartyservicecenter/appointmenttime";
const {
@ -344,7 +315,7 @@ export default {
}
},
async handleComfirm() {
async handleComfirm () {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
@ -365,7 +336,7 @@ export default {
});
},
async submit() {
async submit () {
let url = "";
if (this.formType === "add") {
url = "/gov/org/icpartyservicecenter/appointment";
@ -391,11 +362,11 @@ export default {
}
},
handleCancle() {
handleCancle () {
this.resetData();
this.$emit("dialogCancle");
},
resetData() {
resetData () {
this.dataForm = {
matterId: "",
appointmentDate: "",
@ -407,7 +378,7 @@ export default {
this.timeList = [];
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -415,7 +386,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();

106
src/views/modules/communityService/dqfwzx/cpts/orderList.vue

@ -1,55 +1,55 @@
<template>
<div style="min-height: 400px">
<el-form ref="ref_form" :inline="true" class="form">
<el-form-item
label="选择预约日期"
prop="appointmentDate"
label-width="110px"
style="display: block"
>
<el-date-picker
v-model="appointmentDate"
placeholder="预约日期"
value-format="yyyy-MM-dd"
>
<el-form ref="ref_form"
:inline="true"
class="form">
<el-form-item label="选择预约日期"
prop="appointmentDate"
label-width="110px"
style="display: block">
<el-date-picker v-model="appointmentDate"
placeholder="预约日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-form>
<el-table
v-if="tableData.length > 0"
:data="tableData"
border
style="width: 96%; margin: 0 auto"
class="resi-table"
:max-height="maxTableHeight"
>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="matterName" label="预约事项"></el-table-column>
<el-table-column
prop="appointmentTime"
label="预约时间"
></el-table-column>
<el-table-column prop="appointmentName" label="预约人"></el-table-column>
<el-table-column
prop="appointmentPhone"
label="联系方式"
></el-table-column>
<el-table-column prop="remark" label="备注"></el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120">
<el-table v-if="tableData.length > 0"
:data="tableData"
border
style="width: 96%; margin: 0 auto"
class="resi-table"
:max-height="maxTableHeight">
<el-table-column label="序号"
type="index"
align="center"
width="50" />
<el-table-column prop="matterName"
label="预约事项"></el-table-column>
<el-table-column prop="appointmentTime"
label="预约时间"></el-table-column>
<el-table-column prop="appointmentName"
label="预约人"></el-table-column>
<el-table-column prop="appointmentPhone"
label="联系方式"></el-table-column>
<el-table-column prop="remark"
label="备注"></el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="120">
<template slot-scope="scope">
<el-button
@click="handleCancel(scope.$index)"
type="text"
size="small"
>取消</el-button
>
<el-button @click="handleCancel(scope.$index)"
type="text"
size="small">取消</el-button>
</template>
</el-table-column>
</el-table>
<div class="m-hint" v-else>
<el-empty description="暂无内容" :image-size="200"></el-empty>
<div class="m-hint"
v-else>
<el-empty description="暂无内容"
:image-size="200"></el-empty>
</div>
</div>
</template>
@ -66,7 +66,7 @@ var infoWindowList;
let loading; //
export default {
data() {
data () {
return {
appointmentDate: new Date().toLocaleDateString().split("/").join("-"),
matterId: "",
@ -82,10 +82,10 @@ export default {
},
},
async mounted() {},
async mounted () { },
methods: {
async init(row, index) {
async init (row, index) {
let item = row.matterList[index];
if (item) {
this.matterId = item.matterId;
@ -93,7 +93,7 @@ export default {
}
},
async getList() {
async getList () {
let url = "/gov/org/icpartyservicecenter/appointmentrecord";
const { matterId, appointmentDate } = this;
@ -107,14 +107,14 @@ export default {
if (code === 0) {
this.tableData = data
? data.map((item) => {
item.appointmentTime = item.appointmentTime.join(",");
return item;
})
item.appointmentTime = item.appointmentTime.join(",");
return item;
})
: [];
} else {
}
},
async handleCancel(index) {
async handleCancel (index) {
let url = "/gov/org/icpartyservicecenter/cancelappointment";
const { matterId, tableData } = this;
@ -132,15 +132,15 @@ export default {
}
},
handleCancle() {
handleCancle () {
this.resetData();
this.$emit("dialogCancle");
},
resetData() {
resetData () {
this.tableData = [];
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -148,7 +148,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();

3
src/views/modules/communityService/dqfwzx/index.vue

@ -98,6 +98,7 @@
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleClose">
<edit-form ref="eleEditForm"
@dialogCancle="handleClose"
@ -111,6 +112,7 @@
title="预约"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleCloseForm2">
<order-form ref="eleOrderForm"
@dialogCancle="handleCloseForm2"
@ -124,6 +126,7 @@
title="预约记录"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleCloseOrderList">
<order-list ref="eleOrderList"
@dialogCancle="handleCloseOrderList"></order-list>

247
src/views/modules/workSys/demandCate.vue

@ -1,123 +1,130 @@
<template>
<div v-if="pageLoading" class="resi-container">
<el-card ref="searchCard" class="search-card">
<div v-if="pageLoading"
class="resi-container">
<el-card ref="searchCard"
class="search-card">
<div>
<el-form :inline="true" :model="form" class="demo-form-inline">
<el-form :inline="true"
:model="form"
class="demo-form-inline">
<el-form-item label="需求分类">
<el-select v-model="form.firstCategoryCode" filterable placeholder="请选择" clearable>
<el-option
v-for="item in demandOptions"
:key="item.value"
:label="item.label"
:value="item.value">
<el-select size="small"
v-model="form.firstCategoryCode"
filterable
placeholder="请选择"
clearable>
<el-option v-for="item in demandOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button class="diy-button--search" size="small" @click="handleSearch">查询</el-button>
<el-button class="diy-button--search"
size="small"
@click="handleSearch">查询</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('1', 'add')">新增分类</el-button>
<el-button class="diy-button--add"
size="small"
@click="handleAdd('1', 'add')">新增分类</el-button>
</div>
<el-table
:data="tableData"
row-key="categoryId"
v-loading="tableLoading"
border
:height="tableHeight"
style="width: 100%"
class="resi-table"
>
<el-table-column label="序号" type="index" align="center" width="50">
<el-table :data="tableData"
row-key="categoryId"
v-loading="tableLoading"
border
:height="tableHeight"
style="width: 100%"
class="resi-table">
<el-table-column label="序号"
type="index"
align="center"
width="50">
<template slot-scope="scope">{{ scope.row.index }}</template>
</el-table-column>
<el-table-column
v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
:align="item.align"
>
<el-table-column v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
:align="item.align">
<template slot-scope="scope">
<span>{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<el-table-column label="操作"
align="center"
width="200">
<template slot-scope="scope">
<el-button
v-if="scope.row.hasBtn"
@click="handleLook(scope.row)"
type="text"
size="small"
class="div-table-button--detail"
>{{(scope.row.usableFlag&&'禁用') || '启用'}}</el-button
>
<el-button
v-if="scope.row.level == 1"
@click="handleAdd('2', 'add', scope.row)"
type="text"
size="small"
class="div-table-button--delete"
>添加二级分类</el-button
>
<el-button
@click="handleEdit(scope.row, 'edit')"
type="text"
size="small"
class="div-table-button--edit"
>编辑</el-button
>
<el-button v-if="scope.row.hasBtn"
@click="handleLook(scope.row)"
type="text"
size="small"
class="div-table-button--detail">{{(scope.row.usableFlag&&'禁用') || '启用'}}</el-button>
<el-button v-if="scope.row.level == 1"
@click="handleAdd('2', 'add', scope.row)"
type="text"
size="small"
class="div-table-button--delete">添加二级分类</el-button>
<el-button @click="handleEdit(scope.row, 'edit')"
type="text"
size="small"
class="div-table-button--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 @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="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="categoryName">
<el-input v-model="form.categoryName" size="small" style="width: 180px;"></el-input>
<el-dialog title="居民需求分类"
: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="categoryName">
<el-input v-model="form.categoryName"
size="small"
style="width: 180px;"></el-input>
</el-form-item>
<!-- <el-form-item label="状态">
<el-switch v-model="form.usableFlag"></el-switch>
</el-form-item> -->
<el-form-item v-if="addLevel == '2'" label="奖励积分">
<el-input-number v-model="form.awardPoint" :min="0" size="small" label="描述文字"></el-input-number>
<el-form-item v-if="addLevel == '2'"
label="奖励积分">
<el-input-number v-model="form.awardPoint"
:min="0"
size="small"
label="描述文字"></el-input-number>
</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
>
<el-button size="small"
@click="handlerCancle">取消</el-button>
<el-button type="primary"
size="small"
:loading="btnLoading"
@click="handleSUbmit">提交</el-button>
</div>
</el-dialog>
@ -126,7 +133,7 @@
<script>
export default {
data() {
data () {
return {
tableLoading: false,
btnLoading: false,
@ -145,7 +152,7 @@ export default {
{
label: '是',
value: 1
},{
}, {
label: '否',
value: 2
}
@ -181,30 +188,30 @@ export default {
}
}
},
async created() {
async created () {
this.customerId = localStorage.getItem('customerId')
this.getTableData()
this.getOptions()
this.pageLoading = true
},
mounted() {
mounted () {
this.$nextTick(() => {
this.tableHeight = document.documentElement.clientHeight - this.$refs.searchCard.$el.offsetHeight - 280 + 'px'
console.log('tableHeight', this.tableHeight)
})
},
methods: {
handleSizeChange(val) {
handleSizeChange (val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.getTableData()
},
handleCurrentChange(val) {
handleCurrentChange (val) {
console.log(`当前页: ${val}`)
this.currentPage = val
this.getTableData()
},
handleFilterSpan(row, item) {
handleFilterSpan (row, item) {
let _val = ''
if (item.options && item.options.length > 0) {
item.options.forEach((n) => {
@ -213,21 +220,21 @@ export default {
}
return _val || row[item.columnName]
},
handleSearch(val) {
handleSearch (val) {
console.log('searchhh--', val)
this.currentPage = 1
this.getTableData()
},
handleAdd(type, addType, row) {
handleAdd (type, addType, row) {
this.addLevel = type
this.addType = addType
if (type == '2') this.form = { ...row, categoryName: '' }
this.dialogVisible = true
},
handlerCancle() {
handlerCancle () {
this.dialogVisible = false
},
async handleLook(row) {
async handleLook (row) {
const params = {
categoryId: row.categoryId,
usableFlag: !row.usableFlag
@ -245,14 +252,14 @@ export default {
return this.$message.error('网络错误')
})
},
async handleEdit(row, addType) {
async handleEdit (row, addType) {
this.form = { ...row }
this.addLevel = row.level
this.addType = addType
this.dialogVisible = true
},
async addLevelFirst() {
async addLevelFirst () {
const _form = {
customerId: localStorage.getItem('customerId'),
categoryName: this.form.categoryName
@ -265,12 +272,12 @@ export default {
} else {
this.dialogVisible = false
this.getTableData()
}
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.btnLoading = false
this.btnLoading = false
},
async addLevelChild () {
const _form = {
@ -287,14 +294,14 @@ export default {
} else {
this.dialogVisible = false
this.getTableData()
}
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.btnLoading = false
this.btnLoading = false
},
async editCate() {
async editCate () {
const _form = {
customerId: localStorage.getItem('customerId'),
categoryName: this.form.categoryName,
@ -310,14 +317,14 @@ export default {
} else {
this.dialogVisible = false
this.getTableData()
}
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.btnLoading = false
this.btnLoading = false
},
handleSUbmit() {
handleSUbmit () {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
this.btnLoading = true
@ -325,15 +332,15 @@ export default {
if (this.addLevel == '1') this.addLevelFirst()
else this.addLevelChild()
} else this.editCate()
} else {
console.log('error submit!!');
return false;
}
});
},
handleDel(row) {
handleDel (row) {
let params = {
formCode: 'resi_base_info',
icResiUserId: row.icResiUserId
@ -356,8 +363,8 @@ export default {
return this.$message.error('网络错误')
})
},
sortData() {
const _data = this.tableData.map((item, index)=> {
sortData () {
const _data = this.tableData.map((item, index) => {
return {
id: item.id,
sort: index
@ -377,7 +384,7 @@ export default {
return this.$message.error('网络错误')
})
},
async getOptions() {
async getOptions () {
const params = {
parentCategoryCode: 0
}
@ -394,7 +401,7 @@ export default {
return this.$message.error('网络错误')
})
},
async getTableData() {
async getTableData () {
this.tableLoading = true
let params = {
// formCode: 'resi_base_info',
@ -430,7 +437,7 @@ export default {
})
this.tableLoading = false
}
}
}
</script>
@ -438,13 +445,12 @@ export default {
<style lang="scss" scoped>
.resi-container .resi-card-table {
::v-deep .el-table {
th {
th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
}
.cell {
span:nth-of-type(3) {
display: inline-block;
width: 90%;
@ -483,14 +489,13 @@ export default {
}
}
.avatar-uploader {
::v-deep
.el-upload {
::v-deep .el-upload {
cursor: pointer;
position: relative;
overflow: hidden;
}
.el-upload:hover {
border-color: #409EFF;
border-color: #409eff;
}
.avatar {
width: 70px;
@ -508,8 +513,6 @@ export default {
text-align: center;
}
}
.resi-btns {
margin-top: 20px;

Loading…
Cancel
Save