|
|
@@ -0,0 +1,136 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-button type="primary" size="small" @click="dialogFormVisible = true">{{
|
|
|
+ $t(`添加`)
|
|
|
+ }}</el-button>
|
|
|
+ <el-dialog
|
|
|
+ append-to-body
|
|
|
+ :title="$t(`添加团队人员`)"
|
|
|
+ :visible.sync="dialogFormVisible"
|
|
|
+ width="900px"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ style="width: 200px"
|
|
|
+ :placeholder="$t('搜索')"
|
|
|
+ :suffix-icon="
|
|
|
+ condition ? (condition.length > 0 ? '' : '') : 'el-icon-search'
|
|
|
+ "
|
|
|
+ v-model="condition"
|
|
|
+ @keyup.native.enter="getLeaderList()"
|
|
|
+ @clear="getLeaderList"
|
|
|
+ size="small"
|
|
|
+ class="input-with-select inline-16 layout_search__panel"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import selectTable from "@/components/selectTable/index";
|
|
|
+export default {
|
|
|
+ props: ["data"],
|
|
|
+ components: { selectTable },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogFormVisible: false,
|
|
|
+ classList: [],
|
|
|
+ disabledId: [],
|
|
|
+ tableList: [],
|
|
|
+ tablecols: [],
|
|
|
+ result: [],
|
|
|
+ condition: "",
|
|
|
+ leaderList: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // async onSubmit(data) {
|
|
|
+ // let res = await this.$api.requested({
|
|
|
+ // id: 20220927090106,
|
|
|
+ // content: {
|
|
|
+ // itemtype: 1, //1=总部 2=本地
|
|
|
+ // itemclassids: [data.itemclassid],
|
|
|
+ // itemid: this.data.data.sc_itemid,
|
|
|
+ // itemno: this.data.data.code,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // this.tool.showMessage(res, () => {
|
|
|
+ // this.$emit("onSuccess");
|
|
|
+ // this.getClassList();
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ async getLeaderList() {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ id: 2026052109150402,
|
|
|
+ content: {
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.leaderList = res.data;
|
|
|
+ console.log("this.leaderList", this.leaderList);
|
|
|
+ },
|
|
|
+ // async getClassList() {
|
|
|
+ // let res = await this.$api.requested({
|
|
|
+ // id: "20230325141103",
|
|
|
+ // content: {
|
|
|
+ // sa_brandid: 0,
|
|
|
+ // itemid: this.$route.query.id,
|
|
|
+ // where: {
|
|
|
+ // istool: this.data.data.istool ? 1 : 0,
|
|
|
+ // condition: this.condition,
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // console.log(res.data);
|
|
|
+ // res.data = res.data.map((item, index) => {
|
|
|
+ // return {
|
|
|
+ // itemclassname: item.brandname,
|
|
|
+ // itemclassid: index + 1,
|
|
|
+ // subdep: item.ttemclass,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // this.classList = this.createDeep(res.data);
|
|
|
+ // console.log(this.classList);
|
|
|
+ // },
|
|
|
+ // createDeep(data) {
|
|
|
+ // let arr = [];
|
|
|
+ // function createNodes(node, first) {
|
|
|
+ // let elNode = {
|
|
|
+ // itemclassname: node.itemclassfullname
|
|
|
+ // ? node.itemclassfullname
|
|
|
+ // : node.itemclassname,
|
|
|
+ // itemclassid: node.itemclassid,
|
|
|
+ // itemclassnum: node.itemclassnum,
|
|
|
+ // children: [],
|
|
|
+ // disabled: first ? false : true,
|
|
|
+ // };
|
|
|
+ // if (node.subdep && node.subdep.length > 0) {
|
|
|
+ // for (let index = 0; index < node.subdep.length; index++) {
|
|
|
+ // elNode.children.push(createNodes(node.subdep[index]));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return elNode;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // data.forEach((item) => {
|
|
|
+ // this.disabledId.push(item.itemclassid);
|
|
|
+ // arr.push(createNodes(item, true));
|
|
|
+ // });
|
|
|
+ // return arr;
|
|
|
+ // },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getLeaderList();
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+/deep/.el-dialog__body {
|
|
|
+ padding-bottom: 0 !important;
|
|
|
+}
|
|
|
+</style>
|