|
@@ -93,7 +93,6 @@
|
|
|
:header-cell-style="{ background: '#003c69', color: 'white' }"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <!-- <el-table-column label="序号" align="center" prop="id" /> -->
|
|
|
<el-table-column label="序号" type="index" width="50" align="center">
|
|
|
<template scope="scope">
|
|
|
<span>{{
|
|
@@ -102,12 +101,6 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="单位" align="center" prop="deptName" />
|
|
|
- <!-- <el-table-column
|
|
|
- label="会议议题"
|
|
|
- align="center"
|
|
|
- prop="title"
|
|
|
- show-overflow-tooltip
|
|
|
- /> -->
|
|
|
<el-table-column label="会议议题" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ onEditor(scope.row.title) }}</span>
|
|
@@ -151,6 +144,8 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<pagination
|
|
|
v-show="total > 0"
|
|
|
:total="total"
|
|
@@ -176,7 +171,6 @@
|
|
|
label-width="80px"
|
|
|
:inline="true"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
<el-form-item label="单位" prop="unitId">
|
|
|
<treeselect
|
|
|
v-model="form.unitId"
|
|
@@ -236,11 +230,14 @@
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="参加人" prop="joinId" class="joinId">
|
|
|
<el-select
|
|
|
- ref="bb"
|
|
|
- v-model="form.joinId"
|
|
|
+ ref="abc"
|
|
|
+ v-model="form1.joinId"
|
|
|
multiple
|
|
|
placeholder="请选择参加人"
|
|
|
+ class="input_xiala"
|
|
|
filterable
|
|
|
+ @remove-tag="removeSelect"
|
|
|
+ @change="changeSelect"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in renYuan"
|
|
@@ -248,42 +245,54 @@
|
|
|
:label="item.name"
|
|
|
:value="item.name"
|
|
|
class="input_xiala"
|
|
|
+ :disabled="item.disabled"
|
|
|
+ :class="item.disabled == true ? 'colors' : ''"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="列席人" class="joinId">
|
|
|
<el-select
|
|
|
- ref="cc"
|
|
|
- v-model="form.peopleIds"
|
|
|
+ ref="abcd"
|
|
|
+ v-model="form1.peopleIds"
|
|
|
multiple
|
|
|
placeholder="请选择列席人"
|
|
|
+ class="input_xiala"
|
|
|
filterable
|
|
|
+ @remove-tag="removeSelect"
|
|
|
+ @change="changeSelect"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in renYuan"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
+ :disabled="item.disabled"
|
|
|
:value="item.name"
|
|
|
class="input_xiala"
|
|
|
+ :class="item.disabled == true ? 'colors' : ''"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="缺席人" class="joinId">
|
|
|
<el-select
|
|
|
- ref="dd"
|
|
|
- v-model="form.absentIds"
|
|
|
+ ref="abcde"
|
|
|
+ v-model="form1.absentIds"
|
|
|
multiple
|
|
|
placeholder="请选择缺席人"
|
|
|
+ class="input_xiala"
|
|
|
filterable
|
|
|
+ @remove-tag="removeSelect"
|
|
|
+ @change="changeSelect"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in renYuan"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item.name"
|
|
|
+ :disabled="item.disabled"
|
|
|
class="input_xiala"
|
|
|
+ :class="item.disabled == true ? 'colors' : ''"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -309,8 +318,6 @@
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel" size="btn">取消</el-button>
|
|
|
-
|
|
|
- <!-- <el-button @click="cancel">取 消</el-button> -->
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -444,6 +451,13 @@ export default {
|
|
|
buMeng: [],
|
|
|
// 外面人员
|
|
|
renYuans: [],
|
|
|
+ // 表单参数
|
|
|
+ form1: {
|
|
|
+ joinId: "",
|
|
|
+ peopleIds: "",
|
|
|
+ absentIds: "",
|
|
|
+ },
|
|
|
+ changeArr: [], //存放选中选项的数组
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -453,6 +467,43 @@ export default {
|
|
|
this.onEditor();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //change方法
|
|
|
+ changeSelect() {
|
|
|
+ for (var key in this.form1) {
|
|
|
+ this.form1[key].forEach((item) => {
|
|
|
+ this.changeArr.push(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //有可能会出现重复的元素,所以对changeArr数组进行去重操作
|
|
|
+ this.changeArr = this.quchong(this.changeArr);
|
|
|
+ //对changeArr进行遍历,对hobbyList进行遍历,
|
|
|
+ //changeArr有哪一项,就把hobbyList中该项的disabled属性置为true,禁用
|
|
|
+ this.changeArr.forEach((item) => {
|
|
|
+ this.renYuan.forEach((yitem) => {
|
|
|
+ if (item === yitem.name) {
|
|
|
+ yitem.disabled = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //remove-tag方法,移除某一项时触发该方法
|
|
|
+ removeSelect(val) {
|
|
|
+ //将移除的那一项,从changeArr数组中找到下标,并移除
|
|
|
+ var str = this.changeArr.findIndex((item) => item === val);
|
|
|
+ this.changeArr.splice(str, 1);
|
|
|
+ //对hobbyList数组遍历,将移除的那项disabled属性置为false,启用
|
|
|
+ this.renYuan.forEach((item) => {
|
|
|
+ if (val === item.name) {
|
|
|
+ item.disabled = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //数组去重的方法,避免changeArr出现重复的元素
|
|
|
+ quchong(arr) {
|
|
|
+ return arr.filter(function (item, index, arr) {
|
|
|
+ return arr.indexOf(item, 0) === index;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 获取搜索所有人
|
|
|
getSuo() {
|
|
|
getAll().then((res) => {
|
|
@@ -573,10 +624,10 @@ export default {
|
|
|
},
|
|
|
// 让select失去焦点
|
|
|
blurSelect() {
|
|
|
- this.$refs.aa.blur();
|
|
|
- this.$refs.bb.blur();
|
|
|
- this.$refs.cc.blur();
|
|
|
- this.$refs.dd.blur();
|
|
|
+ // this.$refs.aa.blur();
|
|
|
+ // this.$refs.bb.blur();
|
|
|
+ // this.$refs.cc.blur();
|
|
|
+ // this.$refs.dd.blur();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
@@ -587,6 +638,9 @@ export default {
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
// 人员列表
|
|
|
+ this.form1.absentIds = [];
|
|
|
+ this.form1.joinId = [];
|
|
|
+ this.form1.peopleIds = [];
|
|
|
this.reset();
|
|
|
this.renYuan = [];
|
|
|
this.getTreeselect();
|
|
@@ -603,13 +657,13 @@ export default {
|
|
|
getBdglsoldier(id).then((response) => {
|
|
|
this.result = response.data;
|
|
|
if (this.result.joinId !== "") {
|
|
|
- this.result.joinId = response.data.joinId.split(",");
|
|
|
+ this.form1.joinId = response.data.joinId.split(",");
|
|
|
}
|
|
|
if (this.result.peopleIds !== "" && this.result.peopleIds != null) {
|
|
|
- this.result.peopleIds = response.data.peopleIds.split(",");
|
|
|
+ this.form1.peopleIds = response.data.peopleIds.split(",");
|
|
|
}
|
|
|
if (this.result.absentIds !== "" && this.result.absentIds != null) {
|
|
|
- this.result.absentIds = response.data.absentIds.split(",");
|
|
|
+ this.form1.absentIds = response.data.absentIds.split(",");
|
|
|
}
|
|
|
this.form = this.result;
|
|
|
this.open = true;
|
|
@@ -630,27 +684,28 @@ export default {
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
+ this.form.joinId = this.form1.joinId;
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- if (this.form.joinId !== undefined) {
|
|
|
- this.form.joinId = this.form.joinId.join(",");
|
|
|
+ if (this.form1.joinId !== undefined) {
|
|
|
+ this.form.joinId = this.form1.joinId.join(",");
|
|
|
}
|
|
|
if (
|
|
|
- this.form.peopleIds !== undefined &&
|
|
|
- this.form.peopleIds != null &&
|
|
|
- this.form.peopleIds != ""
|
|
|
+ this.form1.peopleIds !== undefined &&
|
|
|
+ this.form1.peopleIds != null &&
|
|
|
+ this.form1.peopleIds != ""
|
|
|
) {
|
|
|
- this.form.peopleIds = this.form.peopleIds.join(",");
|
|
|
+ this.form.peopleIds = this.form1.peopleIds.join(",");
|
|
|
} else {
|
|
|
this.form.peopleIds = "";
|
|
|
}
|
|
|
if (
|
|
|
- this.form.absentIds !== undefined &&
|
|
|
- this.form.absentIds != null &&
|
|
|
- this.form.absentIds != ""
|
|
|
+ this.form1.absentIds !== undefined &&
|
|
|
+ this.form1.absentIds != null &&
|
|
|
+ this.form1.absentIds != ""
|
|
|
) {
|
|
|
- this.form.absentIds = this.form.absentIds.join(",");
|
|
|
+ this.form.absentIds = this.form1.absentIds.join(",");
|
|
|
} else {
|
|
|
this.form.absentIds = "";
|
|
|
}
|
|
@@ -661,24 +716,24 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
if (
|
|
|
- this.form.peopleIds != null &&
|
|
|
- this.form.peopleIds.length != 0 &&
|
|
|
- this.form.peopleIds != ""
|
|
|
+ this.form1.peopleIds != null &&
|
|
|
+ this.form1.peopleIds.length != 0 &&
|
|
|
+ this.form1.peopleIds != ""
|
|
|
) {
|
|
|
- this.form.peopleIds = this.form.peopleIds.join(",");
|
|
|
+ this.form.peopleIds = this.form1.peopleIds.join(",");
|
|
|
} else {
|
|
|
this.form.peopleIds = "";
|
|
|
}
|
|
|
if (
|
|
|
- this.form.absentIds != null &&
|
|
|
- this.form.absentIds != "" &&
|
|
|
- this.form.absentIds.length != 0
|
|
|
+ this.form1.absentIds != null &&
|
|
|
+ this.form1.absentIds != "" &&
|
|
|
+ this.form1.absentIds.length != 0
|
|
|
) {
|
|
|
- this.form.absentIds = this.form.absentIds.join(",");
|
|
|
+ this.form.absentIds = this.form1.absentIds.join(",");
|
|
|
} else {
|
|
|
this.form.absentIds = "";
|
|
|
}
|
|
|
- this.form.joinId = this.form.joinId.join(",");
|
|
|
+ this.form.joinId = this.form1.joinId.join(",");
|
|
|
addBdglsoldier(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
@@ -901,4 +956,7 @@ export default {
|
|
|
::v-deep .el-select__input {
|
|
|
color: #fff !important;
|
|
|
}
|
|
|
+.colors {
|
|
|
+ color: #ccc !important;
|
|
|
+}
|
|
|
</style>
|