Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
<el-tab-pane label="工作组" name="workgroup">
|
||||
<workgroup></workgroup>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="技术委员会" name="committee">
|
||||
<committee></committee>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
@@ -16,11 +19,13 @@
|
||||
<script>
|
||||
import workgroup from "@/pages/config/pages/mechanismManage/pages/workgroup";
|
||||
import mechanism from "@/pages/config/pages/mechanismManage/pages/mechanism";
|
||||
import committee from "@/pages/config/pages/mechanismManage/pages/committee"
|
||||
export default {
|
||||
name: 'MechanismManage',
|
||||
components: {
|
||||
workgroup,
|
||||
mechanism,
|
||||
committee
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<div id="committee">
|
||||
<div class="committee-content">
|
||||
<div class="search-area">
|
||||
<el-form :model="committeeSearch" inline class="label-input-form">
|
||||
<el-form-item label="委员会名称" class="search-item">
|
||||
<el-input v-model="committeeSearch.committeeName"
|
||||
placeholder="请输入委员会名称"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="" class="search-item btn-box">
|
||||
<el-button class="common-button-primary" type="primary" size="mini" @click="search"
|
||||
v-btn-permission="">查询
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="" class="search-item btn-box">
|
||||
<el-button class="common-button-default" @click="resetSelect" size="mini"
|
||||
v-btn-permission="">清空
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<div class="table-button">
|
||||
<el-button type="primary" size="mini"
|
||||
class="common-button-primary" @click="committeeAdd">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
class="common-button-primary" @click="committeeEdit">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
class="common-button-primary" @click="committeeDel">
|
||||
批量删除
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="committee"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%; flex: auto;"
|
||||
:data="committeeData"
|
||||
@selection-change="committeeChange"
|
||||
border
|
||||
class="drag-table"
|
||||
|
||||
height="100%"
|
||||
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="committeeName"
|
||||
align="center"
|
||||
label="委员会名称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="committeeDirectorName"
|
||||
label="主任"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="committeeSecretaryName"
|
||||
align="center"
|
||||
label="秘书长">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="committor"
|
||||
align="center"
|
||||
label="委员">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<loading :loading="Loading">加载中...</loading>
|
||||
<pagination :page="page" :total="total" :pageSize="pageSize" @pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
:visible.sync="addModel"
|
||||
:wrapperClosable="false"
|
||||
@close="cancelModel"
|
||||
width="800px"
|
||||
>
|
||||
<div class="myDialog">
|
||||
<el-form
|
||||
ref="addForm"
|
||||
:model="addForm"
|
||||
:rules="addFormRules"
|
||||
class="label-input-form"
|
||||
|
||||
>
|
||||
<el-form-item label="委员会名称" prop="committeeName" label-width="100px" class="add-form-item">
|
||||
<el-input v-model="addForm.committeeName"
|
||||
placeholder="请输入委员会名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="主任" prop="committeeDirector" label-width="100px" class="add-form-item">
|
||||
<el-input
|
||||
v-model="addForm.committeeDirectorName"
|
||||
placeholder="请选择主任"
|
||||
@click.native="choiceZRR('committeeDirector', '选择主任', addForm.committeeDirector)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="秘书长" prop="committeeSecretary" label-width="100px" class="add-form-item">
|
||||
<el-input v-model="addForm.committeeSecretaryName"
|
||||
placeholder="请选择秘书长"
|
||||
@click.native="choiceZRR('committeeSecretary', '选择秘书长', addForm.committeeSecretary)"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="委员" prop="committor" label-width="100px" class="add-form-item">
|
||||
<el-input v-model="addForm.committor"
|
||||
placeholder="请选择委员"
|
||||
@click.native="choiceZRRS"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelModel">取消</el-button>
|
||||
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="addOk">确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 单选人-->
|
||||
<Role-tree
|
||||
check-box
|
||||
:is-title="drawerTitle"
|
||||
:is-visible.sync="modalshowflag"
|
||||
@checkedRole="drawerCheck"
|
||||
:nodeList="nodeList"
|
||||
></Role-tree>
|
||||
<!-- 多选择人-->
|
||||
<Role-tree
|
||||
is-title="选择委员"
|
||||
:is-visible.sync="modalshowflag2"
|
||||
@checkedRole="drawerCheck2"
|
||||
:nodeList="nodeList2"
|
||||
></Role-tree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "committee",
|
||||
data() {
|
||||
return {
|
||||
nodeList: [],
|
||||
nodeList2: [],
|
||||
drawerTitle: "",
|
||||
modalshowflag: false,
|
||||
modalshowflag2: false,
|
||||
Loading: false, //加载loading
|
||||
page: 1,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
total: 0,
|
||||
committeeSearch: {
|
||||
committeeName: "", //委员会名称
|
||||
},
|
||||
addForm: {
|
||||
committeeName: "", //委员会名称
|
||||
committeeDirector: "", //主任
|
||||
committeeDirectorName: "", //主任
|
||||
committeeSecretary: "", //秘书长
|
||||
committeeSecretaryName: "", //秘书长
|
||||
committor: "", //委员
|
||||
committeeIds: "" //委员
|
||||
},
|
||||
addFormRules: {
|
||||
committeeName: [
|
||||
{ required: true, message: "请输入委员会名称", trigger: "blur" }
|
||||
],
|
||||
committeeDirectorName: [
|
||||
{ required: true, message: "请填写主任", trigger: "blur" }
|
||||
],
|
||||
committeeSecretaryName: [
|
||||
{ required: true, message: "请填写秘书长", trigger: "blur" }
|
||||
],
|
||||
committor: [
|
||||
{ required: true, message: "请填写委员", trigger: "blur" }
|
||||
]
|
||||
|
||||
},
|
||||
committeeData: [],
|
||||
dialogTitle: "", //新增/编辑框的title
|
||||
addModel: false,
|
||||
committeeChangeList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取委员会数据
|
||||
this.getCommittee();
|
||||
},
|
||||
methods: {
|
||||
getCommittee() {
|
||||
this.$http.get("wgCommittee/wg-committee/page", {
|
||||
...this.committeeSearch,
|
||||
page: this.page,
|
||||
pageSize: this.pageSize
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.committeeData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
});
|
||||
|
||||
},
|
||||
//查询
|
||||
search() {
|
||||
this.page = 1
|
||||
this.getCommittee();
|
||||
},
|
||||
//清空
|
||||
resetSelect() {
|
||||
this.committeeSearch = {
|
||||
committeeName: "", //委员会名称
|
||||
};
|
||||
this.getCommittee();
|
||||
},
|
||||
//新增
|
||||
committeeAdd() {
|
||||
this.dialogTitle = "新增";
|
||||
this.addModel = true;
|
||||
},
|
||||
//编辑
|
||||
committeeEdit() {
|
||||
if (!this.committeeChangeList.length) {
|
||||
this.$message.warning("请至少选择一条数据进行编辑");
|
||||
} else if (this.committeeChangeList.length > 1) {
|
||||
this.$message.warning("您只能选择一条数据进行编辑");
|
||||
} else {
|
||||
this.dialogTitle = "编辑";
|
||||
this.addModel = true;
|
||||
this.addForm.id = this.committeeChangeList[0].id;
|
||||
this.addForm.committeer = this.committeeChangeList[0].committeer;
|
||||
this.addForm.committeeName = this.committeeChangeList[0].committeeName;
|
||||
this.addForm.committor = this.committeeChangeList[0].committor;
|
||||
this.addForm.committeeIds = this.committeeChangeList[0].committorId;
|
||||
this.addForm.committeeDirector = this.committeeChangeList[0].committeeDirector;
|
||||
this.addForm.committeeDirectorName = this.committeeChangeList[0].committeeDirectorName;
|
||||
this.addForm.committeeSecretary = this.committeeChangeList[0].committeeSecretary;
|
||||
this.addForm.committeeSecretaryName = this.committeeChangeList[0].committeeSecretaryName;
|
||||
}
|
||||
},
|
||||
//批量删除
|
||||
committeeDel() {
|
||||
if (this.committeeChangeList.length) {
|
||||
this.$confirm("您确认删除这些数据?", "提示", {
|
||||
confirmButtonText: "确认",
|
||||
confirmButtonClass: "common-button-primary",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if(this.committeeChangeList.length === 1){
|
||||
let ids = this.committeeChangeList[0].id
|
||||
this.$http.delete('wgCommittee/wg-committee/deleteBatch',{
|
||||
id: ids,
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if(res.ok){
|
||||
this.$message.success('删除成功')
|
||||
this.getCommittee()
|
||||
}
|
||||
this.$refs.committee.clearSelection()
|
||||
})
|
||||
}else{
|
||||
let ids = ''
|
||||
this.committeeChangeList.forEach(item => {
|
||||
ids += item.id
|
||||
ids += ','
|
||||
})
|
||||
this.$http.delete('wgCommittee/wg-committee/deleteBatch',{
|
||||
id: ids,
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if(res.ok){
|
||||
this.$message.success('删除成功')
|
||||
this.getCommittee()
|
||||
}
|
||||
this.$refs.committee.clearSelection()
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("请至少选择一条数据进行删除");
|
||||
}
|
||||
},
|
||||
//取消新增
|
||||
cancelModel() {
|
||||
this.addModel = false;
|
||||
},
|
||||
//确定新增
|
||||
addOk() {
|
||||
this.$refs["addForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.dialogTitle === "新增") {
|
||||
this.$http.post("wgCommittee/wg-committee/insert", {
|
||||
...this.addForm
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if(res.ok){
|
||||
this.getCommittee();
|
||||
this.addModel = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$http.put("wgCommittee/wg-committee/update", {
|
||||
...this.addForm
|
||||
}, { _this: this },
|
||||
res => {
|
||||
if(res.ok){
|
||||
this.getCommittee();
|
||||
this.addModel = false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
this.$message.warning("请填写完整信息");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
//表格数据勾选变化
|
||||
committeeChange(data) {
|
||||
this.committeeChangeList = data;
|
||||
},
|
||||
pageChange(page) {
|
||||
this.page = page;
|
||||
this.getCommittee();
|
||||
},
|
||||
pageSizeChange(pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
this.getCommittee();
|
||||
},
|
||||
/** 单选人员选择 */
|
||||
choiceZRR(type, title, id) {
|
||||
this.nodeList = [];
|
||||
this.nodeList.push(id);
|
||||
this.type = type;
|
||||
this.drawerTitle = title;
|
||||
this.modalshowflag = true;
|
||||
},
|
||||
/**单选人员选择确定 **/
|
||||
drawerCheck(data) {
|
||||
if (this.type === "committeeDirector") {
|
||||
this.addForm.committeeDirector = data[0].id;
|
||||
this.addForm.committeeDirectorName = data[0].name;
|
||||
} else if (this.type === "committeeSecretary") {
|
||||
this.addForm.committeeSecretary = data[0].id;
|
||||
this.addForm.committeeSecretaryName = data[0].name;
|
||||
}
|
||||
this.modalshowflag = false;
|
||||
},
|
||||
//多选人员
|
||||
choiceZRRS() {
|
||||
this.nodeList2 = [];
|
||||
if (this.addForm.committeeIds.length > 0) {
|
||||
this.nodeList2 = this.addForm.committeeIds.split(",");
|
||||
}
|
||||
this.modalshowflag2 = true;
|
||||
},
|
||||
drawerCheck2(data) {
|
||||
let idList = "", nameList = "";
|
||||
data.forEach(item => {
|
||||
if (nameList.length > 0) {
|
||||
nameList += ",";
|
||||
idList += ",";
|
||||
}
|
||||
idList += item.id;
|
||||
nameList += item.name;
|
||||
});
|
||||
this.addForm.committeeIds = idList;
|
||||
this.addForm.committor = nameList;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
#committee {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.committee-content {
|
||||
.table-content {
|
||||
width: 100%;
|
||||
height: 68.5vh;
|
||||
|
||||
.table-button {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -167,8 +167,11 @@
|
||||
loading: 'dataLoading'
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.total = res.data.total
|
||||
this.data = res.data.records
|
||||
this.total = res.data.total;
|
||||
res.data.records.forEach(item => {
|
||||
item.account = "(" + item.account + ")" + item.accountName;
|
||||
});
|
||||
this.data = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user