83 lines
1.6 KiB
Vue
83 lines
1.6 KiB
Vue
<!--
|
|
* @Author: zwq
|
|
* @Date: 2025-11-17 16:17:21
|
|
* @LastEditors: zwq
|
|
* @LastEditTime: 2025-11-17 16:30:28
|
|
* @Description:
|
|
-->
|
|
<template>
|
|
<el-popover placement="top" trigger="click" v-model="visible">
|
|
优先级
|
|
<el-select v-model="priority" placeholder="请选择优先级">
|
|
<el-option
|
|
v-for="item in priorityArr"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"></el-option>
|
|
</el-select>
|
|
<div style="text-align: right; margin: 10px 10px 0">
|
|
<el-button size="mini" type="text" @click="visible = false">
|
|
取消
|
|
</el-button>
|
|
<el-button type="primary" size="mini" @click="changePriority">
|
|
确定
|
|
</el-button>
|
|
</div>
|
|
<el-button slot="reference" type="text">
|
|
{{ ['最高', '较高', '常规', '较低', '最低'][injectData.taskPriority] }}
|
|
</el-button>
|
|
</el-popover>
|
|
</template>
|
|
|
|
<script>
|
|
import { updateTask } from '@/api/ssdl/taskList';
|
|
export default {
|
|
props: {
|
|
injectData: {
|
|
type: Object,
|
|
default: () => ({}),
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
list: this.injectData,
|
|
visible: false,
|
|
priorityArr: [
|
|
{
|
|
value: 0,
|
|
label: '最高',
|
|
},
|
|
{
|
|
value: 1,
|
|
label: '较高',
|
|
},
|
|
{
|
|
value: 2,
|
|
label: '常规',
|
|
},
|
|
{
|
|
value: 3,
|
|
label: '较低',
|
|
},
|
|
{
|
|
value: 4,
|
|
label: '最低',
|
|
},
|
|
],
|
|
priority: '',
|
|
};
|
|
},
|
|
created() {},
|
|
methods: {
|
|
changePriority() {
|
|
const data = { ...this.injectData, taskPriority: this.priority };
|
|
updateTask(data).then((res) => {
|
|
this.$modal.msgSuccess('修改成功');
|
|
this.visible = false
|
|
this.$emit('emitData');
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|