吉安感知网项目-前端
罗广辉
2026-01-23 28cfee61d501a686a9a4453570ec5208ff66c180
Merge remote-tracking branch 'origin/master'

# Conflicts:
# applications/task-work-order/src/views/orderView/orderDataManage/appInnovation/index.vue
2 files modified
81 ■■■■ changed files
applications/task-work-order/src/views/orderView/orderDataManage/appInnovation/FormDiaLog.vue 72 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/orderDataManage/appInnovation/index.vue 9 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/orderDataManage/appInnovation/FormDiaLog.vue
@@ -47,7 +47,7 @@
            :model="formData"
            :rules="rules"
            :disabled="dialogReadonly"
            label-width="100px"
            label-width="140px"
        >
            <el-row>
                <el-col :span="12">
@@ -95,17 +95,31 @@
            </el-row>
        </el-form>
        <template #footer>
            <el-button color="#F2F3F5" @click="visible = false">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>
            <el-button
                class="save-btn"
                color="#4C34FF"
                v-if="!dialogReadonly"
                :loading="submitting"
                :disabled="submitting"
                @click="handleSubmit"
            >
                保存
            </el-button>
            <template v-if="!dialogReadonly">
                <el-button color="#F2F3F5" @click="visible = false">取消</el-button>
                <el-button
                    class="save-btn"
                    color="#4C34FF"
                    :loading="submitting"
                    :disabled="submitting"
                    @click="handleSubmit"
                >
                    提交
                </el-button>
            </template>
            <template v-if="dialogReadonly && innovationDetailsStatus ==='0'">
                <el-button color="#F2F3F5" @click="handleReject">不通过</el-button>
                <el-button
                    class="save-btn"
                    color="#4C34FF"
                    :loading="submitting"
                    :disabled="submitting"
                    @click="handleApprove"
                >
                    通过
                </el-button>
            </template>
        </template>
    </el-dialog>
</template>
@@ -130,7 +144,7 @@
    caseDesc: '',
    innovationStatus: '',
})
const innovationDetailsStatus = inject('innovationDetailsStatus')
const emit = defineEmits(['success'])
const formRef = ref(null) // 表单实例
const formData = ref(initForm()) // 表单数据
@@ -156,8 +170,37 @@
    if (!isValid) return
    submitting.value = true
    try {
        formData.value.innovationStatus = dialogMode.value === 'add' ? '0' : formData.value.innovationStatus
        await gdApplicationInnovationSubmitApi(formData.value)
        ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功')
        visible.value = false
        emit('success')
    } finally {
        submitting.value = false
    }
}
// 处理通过
async function handleApprove() {
    submitting.value = true
    try {
        formData.value.innovationStatus = '1'
        await gdApplicationInnovationSubmitApi(formData.value)
        ElMessage.success('审批通过成功')
        visible.value = false
        emit('success')
    } finally {
        submitting.value = false
    }
}
// 处理不通过
async function handleReject() {
    submitting.value = true
    try {
        formData.value.innovationStatus = '2'
        await gdApplicationInnovationSubmitApi(formData.value)
        ElMessage.success('审批不通过成功')
        visible.value = false
        emit('success')
    } finally {
@@ -183,3 +226,6 @@
defineExpose({ open })
</script>
<style scoped lang="scss">
</style>
applications/task-work-order/src/views/orderView/orderDataManage/appInnovation/index.vue
@@ -52,7 +52,7 @@
                    <el-table-column prop="belongDomain" show-overflow-tooltip label="所属领域" />
                    <el-table-column prop="innovationStatus" show-overflow-tooltip label="应用创新状态">
                        <template v-slot="{ row }">
                            {{ getDictLabel(row.innovationStatus) }}
                            {{ getDictLabel(row.innovationStatus, dictObj.appInnovationStatus) }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="applicationScenarioDesc" show-overflow-tooltip label="应用场景描述" />
@@ -63,8 +63,8 @@
                    <el-table-column label="操作" class-name="operation-btns">
                        <template v-slot="{ row }">
                            <el-link @click="openForm('view', row)">查看</el-link>
                            <!--                            <el-link @click="openForm('edit', row)">编辑</el-link>-->
                            <el-link @click="handleDelete(row)">删除</el-link>
<!--                            <el-link @click="openForm('edit', row)">编辑</el-link>-->
                            <el-link @click="handleDelete(row)" v-if="!['1', '2'].includes(row.innovationStatus)">删除</el-link>
                        </template>
                    </el-table-column>
                </el-table>
@@ -113,7 +113,9 @@
const dialogRef = ref(null) // 弹框实例
const dialogVisible = ref(false)
const dictObj = ref({}) // 字典对象
const innovationDetailsStatus = ref( '')
provide('dictObj', dictObj)
provide('innovationDetailsStatus', innovationDetailsStatus)
// 获取字典
function getDictList() {
    return getDictionaryByCode('appInnovationStatus').then(res => {
@@ -148,6 +150,7 @@
// 新增/编辑/查看 弹框
function openForm(mode, row) {
    innovationDetailsStatus.value = row?.innovationStatus
    dialogVisible.value = true
    nextTick(() => {
        dialogRef.value?.open({ mode, row })