|
|
@@ -64,15 +64,7 @@
|
|
|
<div class="detail-row">
|
|
|
<span>状态:</span>
|
|
|
<div v-if="!isEditing.state" @click="editEntry('state')" class="detail-value">
|
|
|
- <template v-if="state === '已创建'">
|
|
|
- <ElTag type="primary">{{state}}</ElTag>
|
|
|
- </template>
|
|
|
- <template v-if="state ==='进行中'">
|
|
|
- <ElTag type="success">{{state}}</ElTag>
|
|
|
- </template>
|
|
|
- <template v-if="state ==='已完成'">
|
|
|
- <ElTag type="info">{{state}}</ElTag>
|
|
|
- </template>
|
|
|
+ <StateTag :state="state"></StateTag>
|
|
|
<div class="edit-icon" />
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
@@ -102,15 +94,7 @@
|
|
|
<div class="detail-row">
|
|
|
<span>优先级:</span>
|
|
|
<div class="detail-value" v-if="!isEditing.priority" @click="editEntry('priority')">
|
|
|
- <template v-if="priority === '紧急'">
|
|
|
- <ElTag type="warning">{{priority}}</ElTag>
|
|
|
- </template>
|
|
|
- <template v-else-if="priority === '一般'">
|
|
|
- <ElTag>{{priority}}</ElTag>
|
|
|
- </template>
|
|
|
- <template v-else-if="priority === '宽松'">
|
|
|
- <ElTag type="success">{{priority}}</ElTag>
|
|
|
- </template>
|
|
|
+ <PriorityTag :priority="priority"></PriorityTag>
|
|
|
<div class="edit-icon" />
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
@@ -229,10 +213,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { RequirementAPI } from '../api';
|
|
|
+import { RequirementAPI } from '@/api';
|
|
|
+import PriorityTag from '@/components/PriorityTag.vue';
|
|
|
+import StateTag from '@/components/StateTag.vue';
|
|
|
|
|
|
export default {
|
|
|
name: 'TaskDrawerContent',
|
|
|
+ components: { PriorityTag, StateTag },
|
|
|
props: {
|
|
|
id: Number,
|
|
|
type: String,
|