Browse Source

还是改bug

shibei_master
dai 3 years ago
parent
commit
66eb1df087
  1. 379
      src/views/modules/communityService/sqzzz/index.vue
  2. 2
      src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record.vue

379
src/views/modules/communityService/sqzzz/index.vue

@ -1,135 +1,145 @@
<template> <template>
<div class="resi-container"> <div class="resi-container">
<el-card ref="searchCard" <el-card ref="searchCard" class="search-card">
class="search-card"> <el-form
<el-form ref="searchForm" ref="searchForm"
:inline="true" :inline="true"
:model="fmData" :model="fmData"
class="demo-form-inline"> class="demo-form-inline"
<el-form-item label="组织名称" >
prop="organizationName"> <el-form-item label="组织名称" prop="organizationName">
<el-input v-model="fmData.organizationName" <el-input
class="resi-cell-input" v-model="fmData.organizationName"
size="small" class="resi-cell-input"
clearable size="small"
placeholder="请输入"> clearable
placeholder="请输入"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建时间" <el-form-item label="创建时间" prop="createTime">
prop="createTime"> <el-date-picker
<el-date-picker v-model="fmData.createTime" v-model="fmData.createTime"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-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-item label="备注" <el-form-item label="备注" prop="remark">
prop="remark"> <el-input
<el-input v-model="fmData.remark" v-model="fmData.remark"
class="resi-cell-input" class="resi-cell-input"
size="small" size="small"
clearable clearable
placeholder="请输入"> placeholder="请输入"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="diy-button--search" <el-button
size="small" class="diy-button--search"
@click="handleSearch">查询</el-button> size="small"
<el-button class="diy-button--reset" @click="handleSearch"
size="small" >查询</el-button
@click="resetForm('searchForm')">重置</el-button> >
<el-button
class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</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" <el-button class="diy-button--add" size="small" @click="handleAdd"
size="small" >新增</el-button
@click="handleAdd">新增</el-button> >
<el-button class="diy-button--export" <el-button
size="small" class="diy-button--export"
@click="handleExportModule('room')">下载模板</el-button> size="small"
<el-upload ref="upload" @click="handleExportModule('room')"
class="upload-btn" >下载模板</el-button
action="uploadUlr" >
:limit="1" <el-upload
:accept="'.xls,.xlsx'" ref="upload"
:with-credentials="true" class="upload-btn"
:show-file-list="false" action="uploadUlr"
:auto-upload="true" :limit="1"
:on-progress="handleProgress" :accept="'.xls,.xlsx'"
:on-success="handleExcelSuccess" :with-credentials="true"
:before-upload="beforeExcelUpload" :show-file-list="false"
:http-request="uploadHttpRequest"> :auto-upload="true"
<el-button size="small" :on-progress="handleProgress"
class="diy-button--delete" :on-success="handleExcelSuccess"
:loading="importLoading">{{ importBtnTitle }}</el-button> :before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button
size="small"
class="diy-button--delete"
:loading="importLoading"
>{{ importBtnTitle }}</el-button
>
</el-upload> </el-upload>
<el-button @click="handleChu" <el-button @click="handleChu" class="diy-button--reset" size="small"
class="diy-button--reset" >导出</el-button
size="small">导出</el-button> >
</div> </div>
<el-table :data="tableData" <el-table
border :data="tableData"
style="width: 100%" border
class="resi-table" style="width: 100%"
:height="maxTableHeight"> class="resi-table"
<el-table-column label="序号" :height="maxTableHeight"
type="index" >
align="center" <el-table-column label="序号" type="index" align="center" width="50" />
width="50" /> <el-table-column
<el-table-column prop="organizationName" prop="organizationName"
label="组织名称" label="组织名称"
align="center"> align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<a class="name-a" <a class="name-a" @click="handleWatch(scope.$index)">
@click="handleWatch(scope.$index)">
{{ scope.row.organizationName }} {{ scope.row.organizationName }}
</a> </a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="categoryName" <el-table-column prop="categoryName" align="center" label="分类名称">
align="center"
label="分类名称">
</el-table-column> </el-table-column>
<el-table-column prop="organizationPersonCount" <el-table-column
align="center" prop="organizationPersonCount"
label="组织人数"> align="center"
label="组织人数"
>
</el-table-column> </el-table-column>
<el-table-column prop="serviceItem" <el-table-column
label="服务事项" prop="serviceItem"
align="center" label="服务事项"
:show-overflow-tooltip="true"> align="center"
:show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
<el-table-column prop="score" <el-table-column prop="score" width="100" align="center" label="积分">
width="100"
align="center"
label="积分">
</el-table-column> </el-table-column>
<el-table-column prop="principalName" <el-table-column prop="principalName" align="center" label="负责人">
align="center"
label="负责人">
</el-table-column> </el-table-column>
<el-table-column prop="principalPhone" <el-table-column prop="principalPhone" align="center" label="联系电话">
align="center"
label="联系电话">
</el-table-column> </el-table-column>
<el-table-column prop="remark" <el-table-column prop="remark" align="center" label="备注">
align="center"
label="备注">
</el-table-column> </el-table-column>
<el-table-column prop="organizationCreatedTime" <el-table-column
align="center" prop="organizationCreatedTime"
label="创建时间"> align="center"
label="创建时间"
>
</el-table-column> </el-table-column>
<el-table-column fixed="right" <el-table-column fixed="right" label="操作" align="center" width="160">
label="操作"
align="center"
width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button <!-- <el-button
@click="handleWatch(scope.$index)" @click="handleWatch(scope.$index)"
@ -137,64 +147,87 @@
size="small" size="small"
>查看</el-button >查看</el-button
> --> > -->
<el-button type="text" <el-button
class="div-table-button--detail" type="text"
size="small" class="div-table-button--detail"
@click="handleScore(scope.row)">积分记录</el-button> size="small"
@click="handleScore(scope.row)"
<el-button @click="handleEdit(scope.$index)" >积分记录</el-button
type="text" >
size="small"
class="div-table-button--edit">修改</el-button> <el-button
@click="handleEdit(scope.$index)"
<el-popconfirm title="删除之后无法回复,确认删除?" v-if="scope.row.agencyId == $store.state.user.agencyId"
@onConfirm="handleDel(scope.row, scope.$index)" type="text"
@confirm="handleDel(scope.row, scope.$index)"> size="small"
<el-button slot="reference" class="div-table-button--edit"
type="text" >修改</el-button
size="small" >
class="div-table-button--delete"
style="margin-left: 10px">删除</el-button> <el-popconfirm
title="删除之后无法回复,确认删除?"
v-if="scope.row.agencyId == $store.state.user.agencyId"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)"
>
<el-button
slot="reference"
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px"
>删除</el-button
>
</el-popconfirm> </el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div> <div>
<el-pagination @size-change="handleSizeChange" <el-pagination
@current-change="handleCurrentChange" @size-change="handleSizeChange"
:current-page.sync="pageNo" @current-change="handleCurrentChange"
:page-sizes="[20, 50, 100, 200]" :current-page.sync="pageNo"
:page-size="parseInt(pageSize)" :page-sizes="[20, 50, 100, 200]"
layout="sizes, prev, pager, next, total" :page-size="parseInt(pageSize)"
:total="total"> layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" <el-dialog
:close-on-click-modal="false" :visible.sync="formShow"
:close-on-press-escape="false" :close-on-click-modal="false"
:title="formTitle" :close-on-press-escape="false"
width="850px" :title="formTitle"
top="5vh" width="850px"
class="dialog-h" top="5vh"
@closed="handleClose"> class="dialog-h"
<edit-form ref="eleEditForm" @closed="handleClose"
@dialogCancle="handleClose" >
@dialogOk="handleEditSuccess"></edit-form> <edit-form
ref="eleEditForm"
@dialogCancle="handleClose"
@dialogOk="handleEditSuccess"
></edit-form>
</el-dialog> </el-dialog>
<!-- 积分记录 --> <!-- 积分记录 -->
<el-dialog :visible.sync="scoreDiaShow" <el-dialog
:close-on-click-modal="false" :visible.sync="scoreDiaShow"
:close-on-press-escape="false" :close-on-click-modal="false"
:title="scoreDiaTitle" :close-on-press-escape="false"
width="70%" :title="scoreDiaTitle"
top="5vh" width="70%"
@closed="diaClose"> top="5vh"
<score-record ref="ref_score" @closed="diaClose"
:serviceType="'community_org'"></score-record> >
<score-record
ref="ref_score"
:serviceType="'community_org'"
></score-record>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -209,7 +242,7 @@ import scoreRecord from "../../../components/scoreRecord.vue";
export default { export default {
components: { editForm, scoreRecord }, components: { editForm, scoreRecord },
data () { data() {
return { return {
openSearch: false, openSearch: false,
@ -239,7 +272,7 @@ export default {
}; };
}, },
computed: { computed: {
maxTableHeight () { maxTableHeight() {
return this.$store.state.inIframe return this.$store.state.inIframe
? this.clientHeight - 360 + this.iframeHeigh ? this.clientHeight - 360 + this.iframeHeigh
: this.clientHeight - 360; : this.clientHeight - 360;
@ -257,11 +290,11 @@ export default {
} }
}, },
}, },
mounted () { mounted() {
this.getTableData(); this.getTableData();
}, },
methods: { methods: {
async handleExportModule () { async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download"; let url = "/heart/iccommunityselforganization/import-template-download";
let params = {}; let params = {};
@ -298,18 +331,18 @@ export default {
}); });
}, },
// //
handleExcelSuccess (res, file) { handleExcelSuccess(res, file) {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("resss---ppp", res); console.log("resss---ppp", res);
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}, },
handleProgress (event, file, fileList) { handleProgress(event, file, fileList) {
console.log("percentage", file.percentage); console.log("percentage", file.percentage);
}, },
beforeExcelUpload (file) { beforeExcelUpload(file) {
console.log("file", file); console.log("file", file);
const isType = file.type === "application/vnd.ms-excel"; const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer = const isTypeComputer =
@ -326,7 +359,7 @@ export default {
} }
return fileType && isLt1M; return fileType && isLt1M;
}, },
async uploadHttpRequest (file) { async uploadHttpRequest(file) {
this.importLoading = true; this.importLoading = true;
this.importBtnTitle = "正在上传中..."; this.importBtnTitle = "正在上传中...";
this.$message({ this.$message({
@ -381,38 +414,38 @@ export default {
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
}, },
handleSizeChange (val) { handleSizeChange(val) {
console.log(`每页 ${val}`); console.log(`每页 ${val}`);
this.pageSize = val; this.pageSize = val;
window.localStorage.setItem("pageSize", val); window.localStorage.setItem("pageSize", val);
this.getTableData(); this.getTableData();
}, },
handleCurrentChange (val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.pageNo = val; this.pageNo = val;
this.getTableData(); this.getTableData();
}, },
handleClose () { handleClose() {
this.formShow = false; this.formShow = false;
}, },
handleSearch (val) { handleSearch(val) {
console.log(this.fmData); console.log(this.fmData);
this.pageNo = 1; this.pageNo = 1;
this.getTableData(); this.getTableData();
}, },
resetForm (formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.handleSearch(); this.handleSearch();
}, },
async handleAdd () { async handleAdd() {
this.formShow = true; this.formShow = true;
await nextTick(); await nextTick();
console.log(this.$refs); console.log(this.$refs);
this.$refs.eleEditForm.initForm("add"); this.$refs.eleEditForm.initForm("add");
}, },
async handleChu () { async handleChu() {
const url = const url =
"/heart/iccommunityselforganization/exportcommunityselforganization"; "/heart/iccommunityselforganization/exportcommunityselforganization";
const { pageSize, pageNo, fmData } = this; const { pageSize, pageNo, fmData } = this;
@ -448,23 +481,23 @@ export default {
}); });
}, },
async handleWatch (rowIndex) { async handleWatch(rowIndex) {
this.formShow = true; this.formShow = true;
await nextTick(); await nextTick();
this.$refs.eleEditForm.initForm("detail", this.tableData[rowIndex]); this.$refs.eleEditForm.initForm("detail", this.tableData[rowIndex]);
}, },
async handleEdit (rowIndex) { async handleEdit(rowIndex) {
this.formShow = true; this.formShow = true;
await nextTick(); await nextTick();
this.$refs.eleEditForm.initForm("edit", this.tableData[rowIndex]); this.$refs.eleEditForm.initForm("edit", this.tableData[rowIndex]);
}, },
handleEditSuccess () { handleEditSuccess() {
this.handleClose(); this.handleClose();
this.getTableData(); this.getTableData();
}, },
async handleDel (rowData, rowIndex) { async handleDel(rowData, rowIndex) {
console.log(rowData, rowIndex); console.log(rowData, rowIndex);
const url = const url =
"/heart/iccommunityselforganization/delcommunityselforganization"; "/heart/iccommunityselforganization/delcommunityselforganization";
@ -478,12 +511,12 @@ export default {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.getTableData(); this.getTableData();
} else { } else {
this.$message.error(msg) this.$message.error(msg);
// this.$message.success(""); // this.$message.success("");
} }
}, },
async getTableData () { async getTableData() {
const url = const url =
"/heart/iccommunityselforganization/communityselforganizationlist"; "/heart/iccommunityselforganization/communityselforganizationlist";
const { pageSize, pageNo, fmData } = this; const { pageSize, pageNo, fmData } = this;
@ -497,23 +530,23 @@ export default {
this.total = data.total || 0; this.total = data.total || 0;
this.tableData = data.list this.tableData = data.list
? data.list.map((item) => { ? data.list.map((item) => {
return item; return item;
}) })
: []; : [];
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
// //
handleScore (row) { handleScore(row) {
this.scoreDiaShow = true; this.scoreDiaShow = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_score.initForm(row.orgId); this.$refs.ref_score.initForm(row.orgId);
}); });
}, },
diaClose () { diaClose() {
this.scoreDiaShow = false; this.scoreDiaShow = false;
}, },
}, },

2
src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record.vue

@ -192,7 +192,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!disabled" label="操作" align="center" width="120"> <el-table-column v-if="!disabled" fixed="right" label="操作" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.isEdit"> <template v-if="scope.row.isEdit">
<el-button <el-button

Loading…
Cancel
Save