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. 11
      src/views/modules/communityService/labelConfig/addForm.vue
  5. 121
      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">

11
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,7 +220,7 @@
<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"
@ -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>

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

@ -1,36 +1,39 @@
<template> <template>
<div class="g-main"> <div class="g-main">
<div class="m-search"> <div class="m-search">
<el-form :inline="true" <el-form
:inline="true"
:model="formData" :model="formData"
ref="ref_searchform" ref="ref_searchform"
:label-width="'120px'"> :label-width="'120px'"
<el-form-item label="标签名称" >
prop="tagName"> <el-form-item label="标签名称" prop="tagName">
<el-input v-model="formData.tagName" <el-input
v-model="formData.tagName"
size="small" size="small"
class="u-item-width-normal" class="u-item-width-normal"
clearable clearable
placeholder="请输入"> 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
style="margin-left: 30px"
size="small" size="small"
type="primary " type="primary "
@click="handleSearchFrom">查询</el-button> @click="handleSearchFrom"
>查询</el-button
>
</el-col> </el-col>
</el-row> </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"
@ -65,22 +68,17 @@
> >
<!-- 按钮权限--> <!-- 按钮权限-->
<template> <template>
<el-popconfirm <el-popconfirm
title="删除之后无法回复,确认删除?" title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)" @onConfirm="handleDel(scope.row)"
> >
<el-button <el-button size="small" type="text" slot="reference"
size="small"
type="text"
slot="reference"
>删除</el-button >删除</el-button
> >
</el-popconfirm> </el-popconfirm>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="div-flex"> <div class="div-flex">
@ -98,23 +96,24 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog :visible.sync="formShow" <el-dialog
:visible.sync="formShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="formTitle" :title="formTitle"
destroy-on-close destroy-on-close
width="900px" width="950px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="diaClose" @closed="diaClose"
> >
<add-form <add-form
v-if="formShow" v-if="formShow"
ref="Config_form" ref="Config_form"
:row-obj="rowObj" :row-obj="rowObj"
@dialogCancle="addFormCancle" @dialogCancle="addFormCancle"
@dialogOk="addFormOk"></add-form> @dialogOk="addFormOk"
></add-form>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -122,13 +121,13 @@
<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,
@ -138,83 +137,80 @@ export default {
searchH: 115, searchH: 115,
formShow: false, formShow: false,
formTitle: "", formTitle: "",
rowObj:{} rowObj: {},
} };
},
created(){
}, },
created() {},
components: { addForm }, components: { addForm },
methods: { methods: {
async getlabelConfigList() { async getlabelConfigList() {
const url = "/governance/resiSearchTag/listResiSearchTags" const url = "/governance/resiSearchTag/listResiSearchTags";
let params = { let params = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
tagName:this.formData.tagName tagName: this.formData.tagName,
} };
let {data,msg,code} = await requestPost(url,params) let { data, msg, code } = await requestPost(url, params);
this.tableLoading = false this.tableLoading = false;
if (code == 0) { if (code == 0) {
this.tableData = data.list this.tableData = data.list;
this.total = data.total this.total = data.total;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
addFormCancle() { addFormCancle() {
this.formShow = false this.formShow = false;
}, },
addFormOk() { addFormOk() {
this.formShow = false this.formShow = false;
this.getlabelConfigList() this.getlabelConfigList();
}, },
handleAdd(row, type) { handleAdd(row, type) {
if (type == "add") { if (type == "add") {
this.formTitle = '新增标签' this.formTitle = "新增标签";
this.formShow = true this.formShow = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Config_form.initForm(type, row) this.$refs.Config_form.initForm(type, row);
}) });
} else { } else {
this.formTitle = '修改标签' this.formTitle = "修改标签";
this.formShow = true this.formShow = true;
console.log(row); console.log(row);
this.rowObj = row this.rowObj = row;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Config_form.initForm(type, row) this.$refs.Config_form.initForm(type, row);
}) });
} }
}, },
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val}`); console.log(`每页 ${val}`);
this.pageSize = val; this.pageSize = val;
this.getlabelConfigList() this.getlabelConfigList();
}, },
async handleDel(row) { async handleDel(row) {
const url = `/governance/resiSearchTag/deleteResiSearchTag/${row.tagId}` const url = `/governance/resiSearchTag/deleteResiSearchTag/${row.tagId}`;
let {code,msg} = await requestPost(url) let { code, msg } = await requestPost(url);
if (code == 0) { if (code == 0) {
this.$message.success('删除成功') this.$message.success("删除成功");
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
this.getlabelConfigList() this.getlabelConfigList();
}, },
handleSearchFrom() { handleSearchFrom() {
this.getlabelConfigList() this.getlabelConfigList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.pageNo = val;
this.getlabelConfigList(); this.getlabelConfigList();
}, },
diaClose() { diaClose() {
this.formShow = false this.formShow = false;
}, },
}, },
async mounted() { async mounted() {
this.getlabelConfigList() this.getlabelConfigList();
}, },
computed: { computed: {
...mapGetters(["clientHeight", "iframeHeight"]), ...mapGetters(["clientHeight", "iframeHeight"]),
@ -224,12 +220,15 @@ export default {
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