|
@@ -98,6 +98,13 @@
|
|
|
<el-button class="btn-main" type="primary" @click="handleAdd">
|
|
<el-button class="btn-main" type="primary" @click="handleAdd">
|
|
|
<el-icon><Plus /></el-icon>新增计划
|
|
<el-icon><Plus /></el-icon>新增计划
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ class="btn-ghost"
|
|
|
|
|
+ :disabled="!selectedPlan"
|
|
|
|
|
+ @click="handleToolbarCopy"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-icon><CopyDocument /></el-icon>复制
|
|
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
class="btn-ghost"
|
|
class="btn-ghost"
|
|
|
:disabled="!selectedPlan || !canArrangeTransport(selectedPlan)"
|
|
:disabled="!selectedPlan || !canArrangeTransport(selectedPlan)"
|
|
@@ -370,6 +377,7 @@
|
|
|
<PlPlanFormDialog
|
|
<PlPlanFormDialog
|
|
|
v-model:visible="formDialogVisible"
|
|
v-model:visible="formDialogVisible"
|
|
|
:plan-id="editingPlanId"
|
|
:plan-id="editingPlanId"
|
|
|
|
|
+ :copy-from-plan-id="copyFromPlanId"
|
|
|
@success="handlePlanMutationSuccess"
|
|
@success="handlePlanMutationSuccess"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
@@ -387,6 +395,9 @@
|
|
|
>
|
|
>
|
|
|
<el-icon><Edit /></el-icon>编辑
|
|
<el-icon><Edit /></el-icon>编辑
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button class="btn-ghost" @click="handleCopy(viewingPlan)">
|
|
|
|
|
+ <el-icon><CopyDocument /></el-icon>复制
|
|
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="canArrangeTransport(viewingPlan)"
|
|
v-if="canArrangeTransport(viewingPlan)"
|
|
|
class="btn-ghost"
|
|
class="btn-ghost"
|
|
@@ -478,6 +489,7 @@ import {
|
|
|
ArrowDown,
|
|
ArrowDown,
|
|
|
Bell,
|
|
Bell,
|
|
|
CircleClose,
|
|
CircleClose,
|
|
|
|
|
+ CopyDocument,
|
|
|
Delete,
|
|
Delete,
|
|
|
Edit,
|
|
Edit,
|
|
|
Plus,
|
|
Plus,
|
|
@@ -525,6 +537,7 @@ const deleteLoading = ref(false)
|
|
|
const waitNoticeLoading = ref(false)
|
|
const waitNoticeLoading = ref(false)
|
|
|
const formDialogVisible = ref(false)
|
|
const formDialogVisible = ref(false)
|
|
|
const editingPlanId = ref('')
|
|
const editingPlanId = ref('')
|
|
|
|
|
+const copyFromPlanId = ref('')
|
|
|
const viewVisible = ref(false)
|
|
const viewVisible = ref(false)
|
|
|
const viewPlanId = ref('')
|
|
const viewPlanId = ref('')
|
|
|
const viewDialogRef = ref<InstanceType<typeof PlPlanViewDialog>>()
|
|
const viewDialogRef = ref<InstanceType<typeof PlPlanViewDialog>>()
|
|
@@ -741,6 +754,7 @@ function handleSizeChange() {
|
|
|
|
|
|
|
|
function handleAdd() {
|
|
function handleAdd() {
|
|
|
editingPlanId.value = ''
|
|
editingPlanId.value = ''
|
|
|
|
|
+ copyFromPlanId.value = ''
|
|
|
formDialogVisible.value = true
|
|
formDialogVisible.value = true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -756,9 +770,21 @@ function handleView(row: Plan) {
|
|
|
|
|
|
|
|
function handleEdit(row: Plan) {
|
|
function handleEdit(row: Plan) {
|
|
|
editingPlanId.value = row.id
|
|
editingPlanId.value = row.id
|
|
|
|
|
+ copyFromPlanId.value = ''
|
|
|
|
|
+ formDialogVisible.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handleCopy(row: Plan) {
|
|
|
|
|
+ editingPlanId.value = ''
|
|
|
|
|
+ copyFromPlanId.value = row.id
|
|
|
formDialogVisible.value = true
|
|
formDialogVisible.value = true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function handleToolbarCopy() {
|
|
|
|
|
+ if (!selectedPlan.value) return
|
|
|
|
|
+ handleCopy(selectedPlan.value)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function canEditPlan(row: Plan) {
|
|
function canEditPlan(row: Plan) {
|
|
|
return row.archiveStatus !== 'archived' && row.followStatus !== 'cancelled'
|
|
return row.archiveStatus !== 'archived' && row.followStatus !== 'cancelled'
|
|
|
}
|
|
}
|