|
@@ -18,6 +18,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="收件人:" prop="userId">
|
|
|
+ <el-button size="mini" type="primary" @click="checkUser"
|
|
|
+ >选择学员</el-button
|
|
|
+ >
|
|
|
<ul>
|
|
|
<li
|
|
|
style="float: left; margin-right: 6px"
|
|
@@ -161,106 +164,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <header>
|
|
|
- 收件人
|
|
|
- <span style="color: red; font-size: 14px"
|
|
|
- >已选择{{ listData.userId.length }}</span
|
|
|
- >
|
|
|
- </header>
|
|
|
- <div>
|
|
|
- <div style="margin: 12px 0px">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- :type="active == 1 ? 'primary' : ''"
|
|
|
- @click="activeBtns(1)"
|
|
|
- >班级选择</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- :type="active == 2 ? 'primary' : ''"
|
|
|
- @click="activeBtns(2)"
|
|
|
- >未分班学员</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- :type="active == 3 ? 'primary' : ''"
|
|
|
- @click="activeBtns(3)"
|
|
|
- >层级选择</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div v-if="active === 1">
|
|
|
- <el-input
|
|
|
- style="margin-bottom: 10px"
|
|
|
- size="small"
|
|
|
- placeholder="输入关键字进行过滤"
|
|
|
- v-model="filterText"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- <div v-if="loadingBox" style="text-align: center">
|
|
|
- <i class="el-icon-loading"></i
|
|
|
- ><span style="font-size: 13px; margin-left: 8px"
|
|
|
- >数据量大,正在加载中...</span
|
|
|
- >
|
|
|
- </div>
|
|
|
- <el-tree
|
|
|
- v-else
|
|
|
- class="filter-tree"
|
|
|
- :data="data"
|
|
|
- :props="defaultProps"
|
|
|
- node-key="onlyId"
|
|
|
- show-checkbox
|
|
|
- :render-after-expand="false"
|
|
|
- :filter-node-method="filterNode"
|
|
|
- ref="tree"
|
|
|
- @check-change="activeChange"
|
|
|
- >
|
|
|
- </el-tree>
|
|
|
- </div>
|
|
|
- <div v-if="active === 2">
|
|
|
- <el-input
|
|
|
- style="margin-bottom: 10px"
|
|
|
- size="small"
|
|
|
- placeholder="输入关键字进行过滤"
|
|
|
- v-model="filterTextTwo"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- <el-tree
|
|
|
- class="filter-tree"
|
|
|
- :data="data1"
|
|
|
- :props="defaultProps"
|
|
|
- node-key="onlyId"
|
|
|
- :render-after-expand="false"
|
|
|
- show-checkbox
|
|
|
- :filter-node-method="filterNode"
|
|
|
- ref="tree1"
|
|
|
- @check-change="activeChangeTwo"
|
|
|
- >
|
|
|
- </el-tree>
|
|
|
- </div>
|
|
|
- <div v-if="active === 3">
|
|
|
- <el-input
|
|
|
- style="margin-bottom: 10px"
|
|
|
- size="small"
|
|
|
- placeholder="输入关键字进行过滤"
|
|
|
- v-model="filterTextThree"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- <el-tree
|
|
|
- class="filter-tree"
|
|
|
- :data="data2"
|
|
|
- :props="defaultProps"
|
|
|
- :render-after-expand="false"
|
|
|
- node-key="onlyId"
|
|
|
- show-checkbox
|
|
|
- :filter-node-method="filterNode"
|
|
|
- ref="tree2"
|
|
|
- @check-change="activeChangeThree"
|
|
|
- >
|
|
|
- </el-tree>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
<el-col :span="24" style="text-align: center; margin-top: 14px">
|
|
|
<el-button @click="backPage">取消</el-button>
|
|
|
<el-button type="primary" @click="submit('listData', 1)"
|
|
@@ -319,7 +222,7 @@
|
|
|
<el-option
|
|
|
v-for="(item, index) in newBusinessLevel"
|
|
|
:key="index"
|
|
|
- :label="item.businessName"
|
|
|
+ :label="item.projectName + item.businessName"
|
|
|
:value="item.id"
|
|
|
>
|
|
|
</el-option>
|
|
@@ -473,16 +376,18 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<bankInfo ref="bankInfo" />
|
|
|
+ <check-user ref="checkUser" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import checkUser from "../checkUser";
|
|
|
import bankInfo from "@/components/bankInfo";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import Editor from "@/components/Editor";
|
|
|
export default {
|
|
|
name: "NotificationListAdd",
|
|
|
- components: { Editor, bankInfo },
|
|
|
+ components: { Editor, bankInfo, checkUser },
|
|
|
data() {
|
|
|
return {
|
|
|
dialogCG: false,
|
|
@@ -496,6 +401,7 @@ export default {
|
|
|
userId: [],
|
|
|
informCourseAddBo: [],
|
|
|
informExamAddBo: [],
|
|
|
+ userFrom:"",
|
|
|
},
|
|
|
arrays: [],
|
|
|
loadingBox: true,
|
|
@@ -542,14 +448,7 @@ export default {
|
|
|
userList: [], //学员列表
|
|
|
options: [],
|
|
|
uploadStatus: 2,
|
|
|
- filterText: "",
|
|
|
- filterTextTwo: "",
|
|
|
- filterTextThree: "",
|
|
|
- data: [],
|
|
|
- data1: [],
|
|
|
- data2: [],
|
|
|
dataCourse: [], //商品课程树形
|
|
|
- active: 1,
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
label: "onlyName",
|
|
@@ -592,15 +491,6 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
- filterText(val) {
|
|
|
- this.$refs.tree.filter(val);
|
|
|
- },
|
|
|
- filterTextTwo(val) {
|
|
|
- this.$refs.tree1.filter(val);
|
|
|
- },
|
|
|
- filterTextThree(val) {
|
|
|
- this.$refs.tree2.filter(val);
|
|
|
- },
|
|
|
"informCourseAdd.educationId"(v) {
|
|
|
this.informCourseAdd = {
|
|
|
educationId: v,
|
|
@@ -641,6 +531,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ backUserList(int,arr){
|
|
|
+ this.listData.userFrom = int
|
|
|
+ this.listData.userId = arr
|
|
|
+ },
|
|
|
+ checkUser() {
|
|
|
+ this.$refs.checkUser.diavosFun(this.listData.userFrom,this.listData.userId);
|
|
|
+ },
|
|
|
seeBank(item) {
|
|
|
this.$refs.bankInfo.$emit("childmethod", item);
|
|
|
},
|
|
@@ -883,113 +780,6 @@ export default {
|
|
|
this.activeThree();
|
|
|
}
|
|
|
},
|
|
|
- activeChange(a, isStatus) {
|
|
|
- if (isNaN(a.onlyId)) {
|
|
|
- if (isStatus) {
|
|
|
- this.data[0].children.map((item) => {
|
|
|
- item.children.map((items) => {
|
|
|
- if (items.userId == a.onlyId.split("-").map(Number)[1]) {
|
|
|
- this.$refs.tree.setChecked(items.onlyId, true);
|
|
|
- if (
|
|
|
- this.listData.userId.indexOf(
|
|
|
- a.onlyId.split("-").map(Number)[1]
|
|
|
- ) == -1
|
|
|
- ) {
|
|
|
- this.listData.userId.push(a.onlyId.split("-").map(Number)[1]);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.data[0].children.map((item) => {
|
|
|
- item.children.map((items) => {
|
|
|
- if (items.userId == a.onlyId.split("-").map(Number)[1]) {
|
|
|
- this.$refs.tree.setChecked(items.onlyId, false);
|
|
|
- if (
|
|
|
- this.listData.userId.indexOf(
|
|
|
- a.onlyId.split("-").map(Number)[1]
|
|
|
- ) !== -1
|
|
|
- ) {
|
|
|
- this.listData.userId.splice(
|
|
|
- this.listData.userId.indexOf(
|
|
|
- a.onlyId.split("-").map(Number)[1]
|
|
|
- ),
|
|
|
- 1
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- activeChangeTwo(a, isStatus) {
|
|
|
- if (!isNaN(a.onlyId)) {
|
|
|
- if (isStatus && this.listData.userId.indexOf(a.onlyId) == -1) {
|
|
|
- this.listData.userId.push(a.onlyId);
|
|
|
- }
|
|
|
- if (!isStatus && this.listData.userId.indexOf(a.onlyId) !== -1) {
|
|
|
- this.listData.userId.splice(
|
|
|
- this.listData.userId.indexOf(a.onlyId),
|
|
|
- 1
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- activeChangeThree(a, isStatus) {
|
|
|
- if (a.onlyId.split("-").map(Number).length === 4) {
|
|
|
- if (isStatus) {
|
|
|
- this.data2[0].children.map((item) => {
|
|
|
- item.children.map((items) => {
|
|
|
- items.children.map((itemsxs) => {
|
|
|
- itemsxs.children.map((j) => {
|
|
|
- if (j.userId == a.onlyId.split("-").map(Number)[3]) {
|
|
|
- this.$refs.tree2.setChecked(j.onlyId, true);
|
|
|
- if (
|
|
|
- this.listData.userId.indexOf(
|
|
|
- a.onlyId.split("-").map(Number)[3]
|
|
|
- ) == -1
|
|
|
- ) {
|
|
|
- this.listData.userId.push(
|
|
|
- a.onlyId.split("-").map(Number)[3]
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.data2[0].children.map((item) => {
|
|
|
- item.children.map((items) => {
|
|
|
- items.children.map((itemsxs) => {
|
|
|
- itemsxs.children.map((j) => {
|
|
|
- if (j.userId == a.onlyId.split("-").map(Number)[3]) {
|
|
|
- this.$refs.tree2.setChecked(j.onlyId, false);
|
|
|
- if (
|
|
|
- this.listData.userId.indexOf(
|
|
|
- a.onlyId.split("-").map(Number)[3]
|
|
|
- ) !== -1
|
|
|
- ) {
|
|
|
- this.listData.userId.splice(
|
|
|
- this.listData.userId.indexOf(
|
|
|
- a.onlyId.split("-").map(Number)[3]
|
|
|
- ),
|
|
|
- 1
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- filterNode(value, data) {
|
|
|
- if (!value) return true;
|
|
|
- return data.onlyName.indexOf(value) !== -1;
|
|
|
- },
|
|
|
//返回上一页
|
|
|
backPage() {
|
|
|
this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
|
|
@@ -1101,148 +891,11 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- recurFunc(x, y, total) {
|
|
|
- this.$api
|
|
|
- .inquiresysteminformlistGrade({ status: 1, pageNum: x, pageSize: y })
|
|
|
- .then((res) => {
|
|
|
- res.rows.forEach((item) => {
|
|
|
- item.onlyId = item.gradeId;
|
|
|
- item.onlyName = item.className;
|
|
|
- item.children = item.classGradeStudentVos;
|
|
|
- item.children.forEach((items) => {
|
|
|
- items.onlyId = items.gradeId + "-" + items.userId;
|
|
|
- items.onlyName = items.realName;
|
|
|
- });
|
|
|
- });
|
|
|
- this.arrays = this.arrays.concat(res.rows);
|
|
|
- if (this.arrays.length == total) {
|
|
|
- this.data = [
|
|
|
- {
|
|
|
- onlyId: 99999999,
|
|
|
- onlyName: "所有班级",
|
|
|
- children: this.arrays,
|
|
|
- },
|
|
|
- ];
|
|
|
- this.activeOne();
|
|
|
- this.loadingBox = false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
//初始获取备注分类
|
|
|
getMes() {
|
|
|
this.$api.inquiresystemclassifylist({ status: 1 }).then((res) => {
|
|
|
this.options = this.handleTree(res.rows, "classifyId", "parentId");
|
|
|
});
|
|
|
- this.$api
|
|
|
- .inquiresysteminformlistGrade({ status: 1, pageNum: 1, pageSize: 1 })
|
|
|
- .then((res) => {
|
|
|
- let total = res.total;
|
|
|
- let pagesize = 20; // 一页多少条
|
|
|
- for (let i = 0; i < Math.ceil(total / pagesize); i++) {
|
|
|
- this.recurFunc(i + 1, pagesize, total);
|
|
|
- }
|
|
|
- });
|
|
|
- this.$api.inquiresysteminformlistGradeStudy({ status: 1 }).then((res) => {
|
|
|
- res.rows.forEach((item, index) => {
|
|
|
- item.onlyId = item.userId;
|
|
|
- item.onlyName = item.realName;
|
|
|
- });
|
|
|
- this.data1 = [
|
|
|
- {
|
|
|
- onlyId: "1-1",
|
|
|
- onlyName: "所有人",
|
|
|
- children: res.rows,
|
|
|
- },
|
|
|
- ];
|
|
|
- });
|
|
|
- this.$api
|
|
|
- .inquiresysteminformlistGradeService({ status: 1 })
|
|
|
- .then((res) => {
|
|
|
- res.rows.forEach((item) => {
|
|
|
- item.onlyId = item.id + "";
|
|
|
- item.onlyName = item.educationName;
|
|
|
- item.children = item.courseUserProjectTypeVo;
|
|
|
- item.children.forEach((items) => {
|
|
|
- items.onlyName = items.projectName;
|
|
|
- items.onlyId = items.educationId + "-" + items.id;
|
|
|
- items.children = items.courseUserBusiness;
|
|
|
- items.children.forEach((itemsxs) => {
|
|
|
- itemsxs.onlyId =
|
|
|
- itemsxs.educationId +
|
|
|
- "-" +
|
|
|
- itemsxs.projectId +
|
|
|
- "-" +
|
|
|
- itemsxs.id;
|
|
|
- itemsxs.onlyName = itemsxs.businessName;
|
|
|
- itemsxs.children = itemsxs.classGradeStudentVos;
|
|
|
- itemsxs.children.forEach((j) => {
|
|
|
- j.onlyName = j.realName;
|
|
|
- j.onlyId = itemsxs.onlyId + "-" + j.userId;
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- this.data2 = [
|
|
|
- {
|
|
|
- onlyId: "999999999",
|
|
|
- onlyName: "所有层级",
|
|
|
- children: res.rows,
|
|
|
- },
|
|
|
- ];
|
|
|
- });
|
|
|
- },
|
|
|
- // int===1
|
|
|
- activeOne() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.data[0].children.forEach((item, index) => {
|
|
|
- item.children.forEach((items) => {
|
|
|
- if (this.listData.userId.length) {
|
|
|
- this.listData.userId.map((itemsxs) => {
|
|
|
- if (itemsxs == items.userId) {
|
|
|
- this.$refs.tree.setChecked(items.onlyId, true);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // int===2
|
|
|
- activeTwo() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.data1.forEach((item, index) => {
|
|
|
- item.children.forEach((items) => {
|
|
|
- if (this.listData.userId.length) {
|
|
|
- this.listData.userId.map((itemsxs) => {
|
|
|
- if (itemsxs == items.userId) {
|
|
|
- this.$refs.tree1.setChecked(items.onlyId, true);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // int===3
|
|
|
- activeThree() {
|
|
|
- var self = this;
|
|
|
- self.$nextTick(() => {
|
|
|
- self.data2[0].children.forEach((item, index) => {
|
|
|
- item.children.forEach((items) => {
|
|
|
- items.children.forEach((itemsxs) => {
|
|
|
- itemsxs.children.forEach((j) => {
|
|
|
- if (self.listData.userId.length) {
|
|
|
- self.listData.userId.map((k) => {
|
|
|
- if (k == j.userId) {
|
|
|
- self.$refs.tree2.setChecked(j.onlyId, true);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
},
|
|
|
//清空时间
|
|
|
changeIssueStatus(v) {
|