|
@@ -8,127 +8,110 @@
|
|
|
:title="$t(`添加团队人员`)"
|
|
:title="$t(`添加团队人员`)"
|
|
|
:visible.sync="dialogFormVisible"
|
|
:visible.sync="dialogFormVisible"
|
|
|
width="900px"
|
|
width="900px"
|
|
|
|
|
+ top="3vh"
|
|
|
|
|
+ @open="getList"
|
|
|
>
|
|
>
|
|
|
<el-input
|
|
<el-input
|
|
|
- style="width: 200px"
|
|
|
|
|
|
|
+ style="width: 200px; margin-bottom: 15px"
|
|
|
:placeholder="$t('搜索')"
|
|
:placeholder="$t('搜索')"
|
|
|
- :suffix-icon="
|
|
|
|
|
- condition ? (condition.length > 0 ? '' : '') : 'el-icon-search'
|
|
|
|
|
- "
|
|
|
|
|
|
|
+ suffix-icon="el-icon-search"
|
|
|
v-model="condition"
|
|
v-model="condition"
|
|
|
- @keyup.native.enter="getLeaderList()"
|
|
|
|
|
- @clear="getLeaderList"
|
|
|
|
|
|
|
+ @keyup.native.enter="getList()"
|
|
|
|
|
+ @clear="getList"
|
|
|
size="small"
|
|
size="small"
|
|
|
- class="input-with-select inline-16 layout_search__panel"
|
|
|
|
|
clearable
|
|
clearable
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ ref="table"
|
|
|
|
|
+ :data="teamList"
|
|
|
|
|
+ stripe
|
|
|
|
|
+ border
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :height="tableHeight"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ @selection-change="selectChange"
|
|
|
>
|
|
>
|
|
|
- </el-input>
|
|
|
|
|
|
|
+ <el-table-column type="selection" width="45" align="center" />
|
|
|
|
|
+ <el-table-column prop="name" :label="$t('姓名')" min-width="150" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column prop="position" :label="$t('职位')" min-width="150" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column prop="phonenumber" :label="$t('手机号')" min-width="180" show-overflow-tooltip />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <span slot="footer">
|
|
|
|
|
+ <el-button @click="dialogFormVisible = false" size="small">{{
|
|
|
|
|
+ $t(`取 消`)
|
|
|
|
|
+ }}</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="onSubmit"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :loading="submitLoading"
|
|
|
|
|
+ :disabled="selectArr.length <= 0"
|
|
|
|
|
+ >{{ $t(`确 定`) }}</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import selectTable from "@/components/selectTable/index";
|
|
|
|
|
export default {
|
|
export default {
|
|
|
props: ["data"],
|
|
props: ["data"],
|
|
|
- components: { selectTable },
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
|
- classList: [],
|
|
|
|
|
- disabledId: [],
|
|
|
|
|
- tableList: [],
|
|
|
|
|
- tablecols: [],
|
|
|
|
|
- result: [],
|
|
|
|
|
|
|
+ teamList: [],
|
|
|
condition: "",
|
|
condition: "",
|
|
|
- leaderList: [],
|
|
|
|
|
|
|
+ selectArr: [],
|
|
|
|
|
+ submitLoading: false,
|
|
|
|
|
+ tableHeight: "calc(75vh - 200px)",
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
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,
|
|
|
|
|
|
|
+ async getList() {
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ id: 2026061111062302,
|
|
|
content: {
|
|
content: {
|
|
|
- pageNumber: 1,
|
|
|
|
|
- pageSize: 100,
|
|
|
|
|
|
|
+ sc_workorderid: this.$route.query.id,
|
|
|
where: {
|
|
where: {
|
|
|
- condition: "",
|
|
|
|
|
|
|
+ condition: this.condition,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
- this.leaderList = res.data;
|
|
|
|
|
- console.log("this.leaderList", this.leaderList);
|
|
|
|
|
|
|
+ this.teamList = res.data || [];
|
|
|
|
|
+ },
|
|
|
|
|
+ selectChange(data) {
|
|
|
|
|
+ this.selectArr = data;
|
|
|
|
|
+ },
|
|
|
|
|
+ async onSubmit() {
|
|
|
|
|
+ if (this.selectArr.length <= 0) return;
|
|
|
|
|
+ this.submitLoading = true;
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ id: 2026061111040702,
|
|
|
|
|
+ content: {
|
|
|
|
|
+ sc_workorderid: this.$route.query.id,
|
|
|
|
|
+ userids: this.selectArr.map((item) => item.userid),
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ this.submitLoading = false;
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ this.$message.error(res.data[0].errmsg);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: this.$t("添加成功"),
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.dialogFormVisible = false;
|
|
|
|
|
+ this.selectArr = [];
|
|
|
|
|
+ this.$emit("onSuccess");
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- // 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() {
|
|
created() {
|
|
|
- this.getLeaderList();
|
|
|
|
|
|
|
+ this.getList();
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
/deep/.el-dialog__body {
|
|
/deep/.el-dialog__body {
|
|
|
padding-bottom: 0 !important;
|
|
padding-bottom: 0 !important;
|