Browse Source

bug#304/bug#303/#bug233/bug#297

V1.0
mk 2 years ago
parent
commit
53e79f91d0
  1. 8
      src/views/modules/communityParty/regionalParty/units.vue
  2. 7
      src/views/modules/communityParty/regionalParty/unitsForm.vue
  3. 2
      src/views/modules/communityService/commonDemand/index.vue
  4. 13
      src/views/modules/communityService/labelConfig/addForm.vue
  5. 419
      src/views/modules/communityService/labelConfig/index.vue
  6. 2
      src/views/modules/communityService/measure/index.vue

8
src/views/modules/communityParty/regionalParty/units.vue

@ -236,7 +236,7 @@
type="text" type="text"
size="small" size="small"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
>修改</el-button >编辑</el-button
> >
<el-popover <el-popover
@ -319,7 +319,7 @@
</div> </div>
</div> </div>
<!-- 修改弹出框 --> <!-- 编辑弹出框 -->
<el-dialog <el-dialog
:visible.sync="formShow" :visible.sync="formShow"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -573,7 +573,7 @@ export default {
}, },
handleEdit(row) { handleEdit(row) {
this.formTitle = "修改"; this.formTitle = "编辑";
this.formShow = true; this.formShow = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form.initForm("edit", row.id); this.$refs.ref_form.initForm("edit", row.id);
@ -725,7 +725,7 @@ export default {
}; };
this.pageSize = 10; this.pageSize = 10;
this.pageNo = 0; this.pageNo = 0;
// this.loadTable() this.loadTable()
}, },
// //

7
src/views/modules/communityParty/regionalParty/unitsForm.vue

@ -168,6 +168,7 @@
size="small" size="small"
v-if="formType != 'detail'" v-if="formType != 'detail'"
type="primary" type="primary"
style="margin-right: 16px;"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm" @click="handleComfirm"
> </el-button > </el-button
@ -318,7 +319,6 @@ export default {
// if (this.formType === 'edit') { // if (this.formType === 'edit') {
// this.formData.id = this.unitId // this.formData.id = this.unitId
// } // }
const { data, code, msg } = await requestPost(url, this.formData); const { data, code, msg } = await requestPost(url, this.formData);
if (code === 0) { if (code === 0) {
@ -501,6 +501,11 @@ export default {
top: 5px; top: 5px;
left: 5px; left: 5px;
} }
.div_btn{
display: flex;
width: 100%;
justify-content: right;
}
</style> </style>
<style lang="scss" scoped > <style lang="scss" scoped >

2
src/views/modules/communityService/commonDemand/index.vue

@ -270,7 +270,7 @@
:close-on-press-escape="false" :close-on-press-escape="false"
:title="addDiaTitle" :title="addDiaTitle"
:modal-append-to-body="false" :modal-append-to-body="false"
width="850px" width="720px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="showAdd = false"> @closed="showAdd = false">

13
src/views/modules/communityService/labelConfig/addForm.vue

@ -1,5 +1,5 @@
<template> <template>
<div> <div class="my_form">
<el-form <el-form
ref="label_form" ref="label_form"
:inline="true" :inline="true"
@ -220,12 +220,12 @@
<el-button <el-button
type="danger" type="danger"
@click="handleClickDelete(scope.$index)" @click="handleClickDelete(scope.$index)"
v-if="scope.$index != tableData.length - 1" v-if="scope.$index != tableData.length - 1||(tableData.length - 1>=1&&scope.$index !='0' )"
size="small" size="small"
:disabled="infoType" :disabled="infoType"
icon="el-icon-minus" icon="el-icon-minus"
circle circle
></el-button> > </el-button>
<!-- <img <!-- <img
src="@/assets/img/icon-add.png" src="@/assets/img/icon-add.png"
@click="handleClickAddRow" @click="handleClickAddRow"
@ -316,6 +316,7 @@ export default {
await this.getFormEdit(row.tagId); await this.getFormEdit(row.tagId);
}else if(type == 'edit'){ }else if(type == 'edit'){
await this.getFormEdit(row.tagId); await this.getFormEdit(row.tagId);
this.formData.tagName = row.tagName;
} }
this.tagId = row.tagId; this.tagId = row.tagId;
this.tagObj = row this.tagObj = row
@ -326,7 +327,7 @@ export default {
this.handleChangeFieldsName(this.tableData[i], [i], type); this.handleChangeFieldsName(this.tableData[i], [i], type);
}, 300); }, 300);
} }
this.formData.tagName = row.tagName;
}, },
querySearchAsync(val, cb) { querySearchAsync(val, cb) {
console.log(this.searchList); console.log(this.searchList);
@ -712,7 +713,9 @@ export default {
.div_btn { .div_btn {
display: flex; display: flex;
justify-content: right; justify-content: right;
margin-right: 16px;
margin-top: 10px; margin-top: 10px;
} }
.my_form{
padding: 10px 50px 0;
}
</style> </style>

419
src/views/modules/communityService/labelConfig/index.vue

@ -1,235 +1,234 @@
<template> <template>
<div class="g-main"> <div class="g-main">
<div class="m-search"> <div class="m-search">
<el-form :inline="true" <el-form
:model="formData" :inline="true"
ref="ref_searchform" :model="formData"
:label-width="'120px'"> ref="ref_searchform"
<el-form-item label="标签名称" :label-width="'120px'"
prop="tagName"> >
<el-input v-model="formData.tagName" <el-form-item label="标签名称" prop="tagName">
size="small" <el-input
class="u-item-width-normal" v-model="formData.tagName"
clearable size="small"
placeholder="请输入"> class="u-item-width-normal"
clearable
placeholder="请输入"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-row type="flex" > <el-row type="flex">
<el-col :span="24" align="right"> <el-col :span="24" align="right">
<el-button style="margin-left:30px" <el-button
size="small" style="margin-left: 30px"
type="primary " size="small"
@click="handleSearchFrom">查询</el-button> type="primary "
</el-col> @click="handleSearchFrom"
</el-row> >查询</el-button
>
</el-col>
</el-row>
</el-form> </el-form>
</div> </div>
<div class="m-table"> <div class="m-table">
<div class="div_btn"> <div class="div_btn">
<el-button <el-button
style="height:32px;" style="height: 32px"
size="small" size="small"
@click="handleAdd({},'add')" @click="handleAdd({}, 'add')"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
> >
新增</el-button 新增</el-button
>
</div>
<el-table
ref="config_table"
border
:data="tableData"
v-loading="tableLoading"
style="width: 100%"
:height="tableHeight"
>
<el-table-column
label="标签名称"
prop="tagName"
fixed="left"
align="center"
key="tagName"
/>
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button
style="margin-right: 10px"
@click="handleAdd(scope.row, 'edit')"
size="small"
type="text"
>修改</el-button
>
<!-- 按钮权限-->
<template>
<el-popconfirm
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)"
>
<el-button size="small" type="text" slot="reference"
>删除</el-button
> >
</div> </el-popconfirm>
<el-table </template>
ref="config_table" </template>
border </el-table-column>
:data="tableData" </el-table>
v-loading="tableLoading"
style="width: 100%"
:height="tableHeight"
>
<el-table-column
label="标签名称"
prop="tagName"
fixed="left"
align="center"
key="tagName"
/>
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button
style="margin-right: 10px"
@click="handleAdd(scope.row,'edit')"
size="small"
type="text"
>修改</el-button
>
<!-- 按钮权限-->
<template >
<el-popconfirm <div class="div-flex">
title="删除之后无法回复,确认删除?" <div class="m-page">
@onConfirm="handleDel(scope.row)" <el-pagination
> @size-change="handleSizeChange"
<el-button @current-change="handleCurrentChange"
size="small" :current-page.sync="pageNo"
type="text" :page-sizes="[20, 50, 100, 200]"
slot="reference" :page-size="pageSize"
>删除</el-button layout="sizes, prev, pager, next, total"
> :total="total"
</el-popconfirm> >
</template> </el-pagination>
</template>
</el-table-column>
</el-table>
<div class="div-flex">
<div class="m-page">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</div>
</div> </div>
<el-dialog :visible.sync="formShow" </div>
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
destroy-on-close
width="900px"
top="5vh"
class="dialog-h"
@closed="diaClose"
>
<add-form
v-if="formShow"
ref="Config_form"
:row-obj="rowObj"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></add-form>
</el-dialog>
</div> </div>
<el-dialog
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
destroy-on-close
width="950px"
top="5vh"
class="dialog-h"
@closed="diaClose"
>
<add-form
v-if="formShow"
ref="Config_form"
:row-obj="rowObj"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"
></add-form>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import addForm from "./addForm.vue" import addForm from "./addForm.vue";
export default { export default {
name:"labelConfig", name: "labelConfig",
data(){ data() {
return{ return {
formData:{ formData: {
tagName:"" tagName: "",
}, },
tableData:[], tableData: [],
pageNo:1, pageNo: 1,
pageSize:20, pageSize: 20,
tableLoading:true, tableLoading: true,
total:0, total: 0,
searchH:115, searchH: 115,
formShow:false, formShow: false,
formTitle:"", formTitle: "",
rowObj:{} rowObj: {},
} };
},
created() {},
components: { addForm },
methods: {
async getlabelConfigList() {
const url = "/governance/resiSearchTag/listResiSearchTags";
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
tagName: this.formData.tagName,
};
let { data, msg, code } = await requestPost(url, params);
this.tableLoading = false;
if (code == 0) {
this.tableData = data.list;
this.total = data.total;
} else {
this.$message.error(msg);
}
}, },
created(){ addFormCancle() {
this.formShow = false;
}, },
components:{addForm}, addFormOk() {
methods:{ this.formShow = false;
async getlabelConfigList(){ this.getlabelConfigList();
const url = "/governance/resiSearchTag/listResiSearchTags" },
let params = { handleAdd(row, type) {
pageNo:this.pageNo, if (type == "add") {
pageSize:this.pageSize, this.formTitle = "新增标签";
tagName:this.formData.tagName this.formShow = true;
} this.$nextTick(() => {
let {data,msg,code} = await requestPost(url,params) this.$refs.Config_form.initForm(type, row);
this.tableLoading = false });
if(code == 0 ){ } else {
this.tableData = data.list this.formTitle = "修改标签";
this.total = data.total this.formShow = true;
}else{ console.log(row);
this.$message.error(msg) this.rowObj = row;
} this.$nextTick(() => {
}, this.$refs.Config_form.initForm(type, row);
addFormCancle () { });
this.formShow = false }
}, },
addFormOk () { handleSizeChange(val) {
this.formShow = false console.log(`每页 ${val}`);
this.getlabelConfigList() this.pageSize = val;
}, this.getlabelConfigList();
handleAdd (row,type) {
if(type=="add"){
this.formTitle = '新增标签'
this.formShow = true
this.$nextTick(() => {
this.$refs.Config_form.initForm(type, row)
})
}else {
this.formTitle = '修改标签'
this.formShow = true
console.log(row);
this.rowObj = row
this.$nextTick(() => {
this.$refs.Config_form.initForm(type, row)
})
}
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getlabelConfigList()
},
async handleDel(row){
const url = `/governance/resiSearchTag/deleteResiSearchTag/${row.tagId}`
let {code,msg} = await requestPost(url)
if(code == 0 ){
this.$message.success('删除成功')
}else {
this.$message.error(msg)
}
this.getlabelConfigList()
},
handleSearchFrom(){
this.getlabelConfigList()
},
handleCurrentChange(val) {
this.pageNo = val;
this.getlabelConfigList();
},
diaClose () {
this.formShow = false
},
}, },
async mounted(){ async handleDel(row) {
this.getlabelConfigList() const url = `/governance/resiSearchTag/deleteResiSearchTag/${row.tagId}`;
let { code, msg } = await requestPost(url);
if (code == 0) {
this.$message.success("删除成功");
} else {
this.$message.error(msg);
}
this.getlabelConfigList();
}, },
computed:{ handleSearchFrom() {
this.getlabelConfigList();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getlabelConfigList();
},
diaClose() {
this.formShow = false;
},
},
async mounted() {
this.getlabelConfigList();
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]), ...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() { tableHeight() {
const h = this.clientHeight - this.searchH - 275 + this.iframeHeight; const h = this.clientHeight - this.searchH - 275 + this.iframeHeight;
const _h = this.clientHeight - 275 - this.searchH; const _h = this.clientHeight - 275 - this.searchH;
return this.$store.state.inIframe ? h : _h; return this.$store.state.inIframe ? h : _h;
},
}, },
watch:{} },
} watch: {},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss"; @import "@/assets/scss/modules/management/list-main.scss";
.div_btn{ .div_btn {
margin-bottom: 12px; margin-bottom: 12px;
}
.dialog-h{
padding: 0 50px;
} }
</style> </style>

2
src/views/modules/communityService/measure/index.vue

@ -283,7 +283,7 @@
:close-on-press-escape="false" :close-on-press-escape="false"
:title="addDiaTitle" :title="addDiaTitle"
:modal-append-to-body="false" :modal-append-to-body="false"
width="850px" width="720px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="showAdd = false"> @closed="showAdd = false">

Loading…
Cancel
Save