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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save