|
|
@@ -64,36 +64,13 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item
|
|
|
- :label="$t('负责人')"
|
|
|
- prop="leader_userid"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- class="inline-24"
|
|
|
- v-model="form.leader_userid"
|
|
|
- :placeholder="$t(`请选择负责人`)"
|
|
|
- size="small"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in leaderList"
|
|
|
- :key="index"
|
|
|
- :label="`${$t(item.name)} ${$t(
|
|
|
- item.position
|
|
|
- )}`"
|
|
|
- :value="item.userid"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item
|
|
|
- :label="$t('参与人')"
|
|
|
+ :label="$t('团队成员')"
|
|
|
prop="part_userids"
|
|
|
>
|
|
|
<el-select
|
|
|
class="inline-24"
|
|
|
v-model="form.part_userids"
|
|
|
- :placeholder="$t(`请选择参与人`)"
|
|
|
+ :placeholder="$t(`请选择团队成员`)"
|
|
|
size="small"
|
|
|
clearable
|
|
|
multiple
|
|
|
@@ -137,6 +114,38 @@
|
|
|
>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
+ <el-dialog
|
|
|
+ :title="$t('选择负责人')"
|
|
|
+ :visible.sync="leaderDialogVisible"
|
|
|
+ width="400px"
|
|
|
+ append-to-body
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <el-form size="mini">
|
|
|
+ <el-form-item required>
|
|
|
+ <el-radio-group v-model="tempLeaderUserid">
|
|
|
+ <el-radio
|
|
|
+ v-for="(item, index) in teamMemberOptions"
|
|
|
+ :key="index"
|
|
|
+ :label="item.userid"
|
|
|
+ >{{ $t(item.name) }} {{ $t(item.position) }}</el-radio
|
|
|
+ >
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="cancelLeaderDialog">{{
|
|
|
+ $t("取 消")
|
|
|
+ }}</el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ :disabled="!tempLeaderUserid"
|
|
|
+ @click="confirmLeader"
|
|
|
+ >{{ $t("确 定") }}</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -148,6 +157,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
dialogFormVisible: false,
|
|
|
+ leaderDialogVisible: false,
|
|
|
+ tempLeaderUserid: "",
|
|
|
serveModelList: [],
|
|
|
serveClassList: [],
|
|
|
leaderList: [],
|
|
|
@@ -174,16 +185,24 @@ export default {
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
- leader_userid: [
|
|
|
+ part_userids: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t("请选择负责人"),
|
|
|
+ message: this.$t("请选择团队成员"),
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ teamMemberOptions() {
|
|
|
+ if (!this.form.part_userids || !this.form.part_userids.length) return [];
|
|
|
+ return this.leaderList.filter((item) =>
|
|
|
+ this.form.part_userids.includes(item.userid)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
show() {
|
|
|
this.form.remarks = this.data.remarks;
|
|
|
@@ -192,23 +211,44 @@ export default {
|
|
|
this.getLeaderList();
|
|
|
},
|
|
|
onSubmit() {
|
|
|
- this.$refs["form"].validate(async (valid) => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (!valid) return false;
|
|
|
- this.form.sc_serviceformid = this.$route.query.id;
|
|
|
- const res = await this.$api.requested({
|
|
|
- id: "2026052013202502",
|
|
|
- version: 1,
|
|
|
- content: this.form,
|
|
|
- });
|
|
|
- this.tool.showMessage(res, () => {
|
|
|
- this.$emit("onSuccess");
|
|
|
- this.$refs["form"].resetFields();
|
|
|
- this.dialogFormVisible = false;
|
|
|
- });
|
|
|
+ this.tempLeaderUserid = "";
|
|
|
+ this.leaderDialogVisible = true;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancelLeaderDialog() {
|
|
|
+ this.leaderDialogVisible = false;
|
|
|
+ this.tempLeaderUserid = "";
|
|
|
+ },
|
|
|
+ async confirmLeader() {
|
|
|
+ if (!this.tempLeaderUserid) return;
|
|
|
+ this.leaderDialogVisible = false;
|
|
|
+ this.form.leader_userid = this.tempLeaderUserid;
|
|
|
+ // 过滤掉part_userids中被选为负责人的id
|
|
|
+ const submitData = {
|
|
|
+ ...this.form,
|
|
|
+ part_userids: this.form.part_userids.filter(
|
|
|
+ (id) => id !== this.tempLeaderUserid
|
|
|
+ ),
|
|
|
+ };
|
|
|
+ submitData.sc_serviceformid = this.data.sc_serviceformid;
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ id: "2026052013202502",
|
|
|
+ version: 1,
|
|
|
+ content: submitData,
|
|
|
+ });
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
+ this.$emit("onSuccess");
|
|
|
+ this.$refs["form"].resetFields();
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ this.tempLeaderUserid = "";
|
|
|
});
|
|
|
},
|
|
|
onCancel() {
|
|
|
this.dialogFormVisible = false;
|
|
|
+ this.leaderDialogVisible = false;
|
|
|
+ this.tempLeaderUserid = "";
|
|
|
this.$refs["form"].resetFields();
|
|
|
},
|
|
|
modelChange(data) {
|
|
|
@@ -222,6 +262,7 @@ export default {
|
|
|
content: {
|
|
|
pageNumber: 1,
|
|
|
pageSize: 100,
|
|
|
+ isused:1,
|
|
|
where: {
|
|
|
condition: "",
|
|
|
},
|