Commit d37ca124 authored by qiyaxin's avatar qiyaxin

CCAP控制计划管理-列表操作

parent 756474e0
......@@ -16,3 +16,11 @@ export function getAllBusinessUnitName(query) {
data: query,
})
}
// 查询CCAP控制计划历史列表
export function getCCAPPlanHistoryList(query) {
return request({
url: '/ccapPlan/hisList',
method: 'get',
params: query
})
}
......@@ -21,5 +21,12 @@
"COPTestAndChecklistFormStatus": "COP试验和检查表表单状态",
"operation": "操作",
"serialNumber": "序号",
"viewHistoricalControlPlan": "查看历史控制计划"
"viewHistoricalControlPlan": "查看历史控制计划",
"view": "查看",
"revoke": "撤销",
"adjustCompilationResponsiblePerson": "调整编制负责人",
"generateFile": "生成文件",
"remindDownload": "提醒下载",
"change": "变更",
"fineTune": "微调"
}
......@@ -21,5 +21,12 @@
"COPTestAndChecklistFormStatus": "COP Test and Checklist Form Status",
"operation": "Operation",
"serialNumber": "Ordinal",
"viewHistoricalControlPlan": "View Historical Control Plan"
"viewHistoricalControlPlan": "View Historical Control Plan",
"view": "View",
"revoke": "Revoke",
"adjustCompilationResponsiblePerson": "Adjust Compilation Responsible Person",
"generateFile": "Generate File",
"remindDownload": "Remind Download",
"change": "Change",
"fineTune": "Fine - Tune"
}
......@@ -3,6 +3,7 @@
"reset": "重置",
"pleaseChoose": "请选择",
"pleaseEnter": "请输入",
"pleaseChooseOrEnter": "请选择或输入",
"businessDivision": "事业部",
"vehicleTypeCode": "车型代码",
"vehicleTypeSeries": "车型系列",
......@@ -21,5 +22,17 @@
"COPTestAndChecklistFormStatus": "COP试验和检查表表单状态",
"operation": "操作",
"serialNumber": "序号",
"viewHistoricalControlPlan": "查看历史控制计划"
"viewHistoricalControlPlan": "查看历史控制计划",
"view": "查看",
"revoke": "撤销",
"adjustCompilationResponsiblePerson": "调整编制负责人",
"generateFile": "生成文件",
"remindDownload": "提醒下载",
"change": "变更",
"fineTune": "微调",
"delete": "删除",
"prompt": "提示",
"confirmUndoControlPlan": "确定撤销该控制计划吗?",
"cancel": "取消",
"confirm": "确定"
}
......@@ -3,6 +3,7 @@
"reset": "Reset",
"pleaseChoose": "Please Choose",
"pleaseEnter": "Please Enter",
"pleaseChooseOrEnter": "Please choose or enter",
"businessDivision": "Business division",
"vehicleTypeCode": "Vehicle Type Code",
"vehicleTypeSeries": "Vehicle Type Series",
......@@ -21,5 +22,17 @@
"COPTestAndChecklistFormStatus": "COP Test and Checklist Form Status",
"operation": "Operation",
"serialNumber": "Ordinal",
"viewHistoricalControlPlan": "View Historical Control Plan"
"viewHistoricalControlPlan": "View Historical Control Plan",
"view": "View",
"revoke": "Revoke",
"adjustCompilationResponsiblePerson": "Adjust Compilation Responsible Person",
"generateFile": "Generate File",
"remindDownload": "Remind Download",
"change": "Change",
"fineTune": "Fine Tune",
"delete": "Delete",
"prompt": "Prompt",
"confirmUndoControlPlan": "Are you sure to undo this control plan?",
"cancel": "Cancel",
"confirm": "Confirm"
}
......@@ -2,17 +2,17 @@
<div class="app-container">
<el-form v-model="queryParams" ref="queryRef" :inline="true" >
<!-- 事业部 -->
<el-form-item :label="`${cn.businessDivision}/${en.businessDivision}`" prop="status">
<el-form-item :label="`${cn.businessDivision}/${en.businessDivision}`" prop="businessUnitId">
<el-select
v-model="queryParams"
v-model="queryParams.businessUnitId"
:placeholder="`${cn.pleaseChoose}/${en.pleaseChoose}`"
clearable
style="width: 200px"
>
<el-option
v-for="dict in businessList"
:label="dict.businessUnitName"
:value="dict.id"
v-for="item in businessList"
:label="item.businessUnitName"
:value="item.businessUnitName"
/>
</el-select>
</el-form-item>
......@@ -226,6 +226,9 @@
<div>{{en.controlPlanStatus}}</div>
</div>
</template>
<template #default="scope">
<span :class="getStatusClass(changeControlPlanStatus(scope.row.controlPlanStatus))">{{ changeControlPlanStatus(scope.row.controlPlanStatus) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
<template #header>
......@@ -252,12 +255,38 @@
import cn from '@/locales/controlPlan/CCAPControlPlan/CCAPControlPlanManagement/history/cn.json'
import en from '@/locales/controlPlan/CCAPControlPlan/CCAPControlPlanManagement/history/en.json'
import { ref } from 'vue'
import {
getAllBusinessUnitName,
getCCAPPlanHistoryList,
getCCAPPlanList,
} from '@/api/CCAPControlPlanManagement/CCAPControlPlanManagement.js'
const total = ref(0);
const queryParams = ref({
pageNum: 1,
pageSize: 10
pageSize: 10,
businessUnitId:null,
vehicleModelCode:null,
vehicleSeries:null,
versionNumber:null,
controlPlanStatus:null,
createBy:null
});
const businessList = ref([]);
const tableList = ref([]);
function getAllBusinessUnit() {
getAllBusinessUnitName().then(res => {
businessList.value = res.data
})
}
function getList() {
getCCAPPlanHistoryList(queryParams.value).then(res => {
total.value = res.total
tableList.value = res.rows
});
}
</script>
<style scoped lang="scss">
......
<template>
<div class="app-container">
<el-form v-model="queryParams" ref="queryRef" :inline="true" >
<!-- 控制计划编号 -->
<el-form-item :label="`${cn.controlPlanNumber}/${en.controlPlanNumber}`" prop="">
<el-input
v-model="queryParams.createBy"
:placeholder="`${cn.pleaseEnter}/${en.pleaseEnter}`"
clearable
style="width: 200px"
/>
</el-form-item>
<!-- 事业部 -->
<el-form-item :label="`${cn.businessDivision}/${en.businessDivision}`" prop="businessUnitId">
<el-select
......@@ -20,8 +29,9 @@
<el-form-item :label="`${cn.vehicleTypeCode}/${en.vehicleTypeCode}`" prop="vehicleModelCode">
<el-select
v-model="queryParams.vehicleModelCode"
:placeholder="`${cn.pleaseChoose}/${en.pleaseChoose}`"
:placeholder="`${cn.pleaseChooseOrEnter}/${en.pleaseChooseOrEnter}`"
clearable
filterable
style="width: 200px"
>
<el-option
......@@ -40,10 +50,10 @@
style="width: 200px"
>
<el-option
v-for="dict in businessList"
:label="dict.businessUnitName"
:value="dict.id"
/>
v-for="dict in vehicle_model_series"
:key="dict.key"
:label="dict.label"
:value="dict.value"/>
</el-select>
</el-form-item>
<!-- 版本号 -->
......@@ -56,6 +66,15 @@
style="width: 200px"
/>
</el-form-item>
<!-- 生产地址 -->
<el-form-item :label="`${cn.productionAddress}/${en.productionAddress}`" prop="">
<el-input
v-model="queryParams.createBy"
:placeholder="`${cn.pleaseEnter}/${en.pleaseEnter}`"
clearable
style="width: 200px"
/>
</el-form-item>
<!-- 创建人 -->
<el-form-item :label="`${cn.creator}/${en.creator}`" prop="createBy">
<el-input
......@@ -65,6 +84,15 @@
style="width: 200px"
/>
</el-form-item>
<!-- 生产厂 -->
<el-form-item :label="`${cn.productionPlant}/${en.productionPlant}`" prop="">
<el-input
v-model="queryParams.createBy"
:placeholder="`${cn.pleaseEnter}/${en.pleaseEnter}`"
clearable
style="width: 200px"
/>
</el-form-item>
<!-- 控制计划状态 -->
<el-form-item :label="`${cn.controlPlanStatus}/${en.controlPlanStatus}`" prop="controlPlanStatus">
<el-select
......@@ -75,7 +103,7 @@
>
<el-option
v-for="dict in control_plan_status"
:key="dict.value"
:key="dict.key"
:label="dict.label"
:value="dict.value"/>
</el-select>
......@@ -228,16 +256,75 @@
</div>
</template>
<template #default="scope">
<span :class="getStatusClass(changeControlPlanStatus(scope.row.controlPlanStatus))">{{ changeControlPlanStatus(scope.row.controlPlanStatus) }}</span>
<!-- <span :class="getStatusClass(changeControlPlanStatus(scope.row.controlPlanStatus))">{{ changeControlPlanStatus(scope.row.controlPlanStatus) }}</span>-->
<dict-tag :options="control_plan_status" :value="scope.row.controlPlanStatus"/>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="330">
<template #header>
<div style="display: flex;flex-direction: column">
<div>{{cn.operation}}</div>
<div>{{en.operation}}</div>
</div>
</template>
<template #default="scope">
<!-- 查看 -->
<el-button link type="primary" @click="handleView(scope.row)">
<div>
<div>{{cn.view}}</div>
<div>{{en.view}}</div>
</div>
</el-button>
<!-- 撤销 -->
<el-button link type="danger" @click="handleUndo(scope.row)">
<div>
<div>{{cn.revoke}}</div>
<div>{{en.revoke}}</div>
</div>
</el-button>
<!-- 删除 -->
<el-button link type="danger" >
<div>
<div>{{cn.delete}}</div>
<div>{{en.delete}}</div>
</div>
</el-button>
<!-- 调整编制负责人 -->
<el-button link type="primary" >
<div>
<div>{{cn.adjustCompilationResponsiblePerson}}</div>
<div>{{en.adjustCompilationResponsiblePerson}}</div>
</div>
</el-button>
<!-- 生成文件 -->
<el-button link type="warning">
<div>
<div>{{cn.generateFile}}</div>
<div>{{en.generateFile}}</div>
</div>
</el-button>
<!-- 提醒下载 -->
<el-button link type="primary" @click="handleRemindDownload(row)">
<div>
<div>{{cn.remindDownload}}</div>
<div>{{en.remindDownload}}</div>
</div>
</el-button>
<!-- 变更 -->
<el-button link type="warning">
<div>
<div>{{cn.change}}</div>
<div>{{en.change}}</div>
</div>
</el-button>
<!-- 微调 -->
<el-button link type="primary">
<div>
<div>{{cn.fineTune}}</div>
<div>{{en.fineTune}}</div>
</div>
</el-button>
</template>
</el-table-column>
</el-table>
......@@ -249,6 +336,60 @@
@pagination="getList"
/>
</div>
<!-- 撤销弹出框-->
<el-dialog
v-model="undoDialogVisible"
title="提示"
width="500"
align-center
style="width: 400px;height: 195px;margin-top: 300px" :fullscreen="true"
>
<template #header>
<div>{{cn.prompt}}</div>
<div>{{en.prompt}}</div>
</template>
<div style="display: flex;align-items: center;">
<el-icon style="color: orange;font-size: 18px;margin:5px"><WarningFilled /></el-icon>
<div>
<div style="font-size: 14px">{{cn.confirmUndoControlPlan}}</div>
<div style="font-size: 14px">{{en.confirmUndoControlPlan}}</div>
</div>
</div>
<template #footer>
<div style="margin-top: 10px">
<el-button class="btn-B" @click="undoDialogVisible = false">{{cn.cancel}}/{{en.cancel}}</el-button>
<el-button class="btn-A" @click="undoDialogVisible = false">{{cn.confirm}}/{{en.confirm}}</el-button>
</div>
</template>
</el-dialog>
<!-- 提醒下载抽屉-->
<el-drawer @close="closeDrawer" v-model="drawer" :size="!isDrawer?'40%':'32%'">
<template #header>
提醒下载
</template>
<template #default>
<!-- 选择消息接收人 -->
<div class="tab-components">
<span class="components-span">选择消息接收人</span>
</div>
<!-- 编辑消息内容 -->
<div class="tab-components">
<span class="components-span">编辑消息内容</span>
</div>
</template>
<template #footer>
<div style="flex: auto">
<el-button class="btn-B" @click="handleCloseDrawer">取消</el-button>
<el-button class="btn-A" type="primary" @click="confirmClick">确定</el-button>
</div>
</template>
</el-drawer>
</template>
<script setup>
......@@ -263,7 +404,7 @@ import { useRouter } from 'vue-router'
import { getDicts } from '@/api/system/dict/data.js'
const router = useRouter()
const { proxy } = getCurrentInstance();
const { control_plan_status} = proxy.useDict('control_plan_status');
const {vehicle_model_series, control_plan_status} = proxy.useDict('vehicle_model_series','control_plan_status');
const total = ref(0);
const queryParams = ref({
......@@ -280,6 +421,10 @@ const queryParams = ref({
const businessList = ref([]);
const tableList = ref([]);
const controlPlanStatusOptions = ref([]);
//撤回弹出框
const undoDialogVisible = ref(false)
//提醒下载抽屉
const drawer = ref(false)
function getAllBusinessUnit() {
getAllBusinessUnitName().then(res => {
......@@ -294,33 +439,35 @@ function getList() {
});
}
//字典转换
//控制计划状态字典
getDicts("control_plan_status").then(response => {
controlPlanStatusOptions.value = response.data;
// console.log("控制计划字典",controlPlanStatusOptions.value)
});
function changeControlPlanStatus(before) {
// console.log("控制计划字典原数据",before)
if(!controlPlanStatusOptions.value) return before
let item = controlPlanStatusOptions.value.find(item=>item.dictValue === before)
return item.dictLabel
}
// 根据转换后的状态文字返回对应的类名
function getStatusClass(statusText) {
switch (statusText) {
case '编制中':
return 'status-progress';
case '编制完成':
return 'status-completed';
case '已最终确认':
return 'status-finalized';
case '已撤销':
return 'status-cancelled';
default:
return '';
}
}
// //字典转换
// //控制计划状态字典
// getDicts("control_plan_status").then(response => {
// controlPlanStatusOptions.value = response.data;
// // console.log("控制计划字典",controlPlanStatusOptions.value)
// });
// function changeControlPlanStatus(before) {
// // console.log("控制计划字典原数据",before)
// if(!controlPlanStatusOptions.value) return before
// let item = controlPlanStatusOptions.value.find(item=>item.dictValue === before)
// return item.dictLabel
// }
// // 根据转换后的状态文字返回对应的类名
// function getStatusClass(statusText) {
// switch (statusText) {
// case '编制中':
// return 'status-progress';
// case '编制完成':
// return 'status-completed';
// case '已最终确认':
// return 'status-finalized';
// case '已撤销':
// return 'status-cancelled';
// case '已删除':
// return 'status-cancelled';
// default:
// return '';
// }
// }
/** 搜索按钮操作 */
function handleQuery() {
......@@ -349,6 +496,31 @@ function toHistory() {
proxy.$router.push({ path: '/control/CCAPControlPlan/history' });
}
/** 查看按钮操作 */
function handleView(row) {
proxy.$router.push({ path: '/control/CCAPControlPlan/view',query: {id: row.id}});
}
/** 撤销按钮操作 */
function handleUndo(row) {
undoDialogVisible.value = true
}
/** 提醒下载按钮操作 */
function handleRemindDownload(row) {
drawer.value = true
}
/** 关闭抽屉按钮操作 */
function closeDrawer(){
getList()
}
function handleCloseDrawer(){
drawer.value = false
}
onMounted(()=>{
getList()
getAllBusinessUnit()
......@@ -371,5 +543,16 @@ onMounted(()=>{
:deep(.el-pagination.is-background .el-pager li.is-active){
background-color: #0154FB;
}
.tab-components{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
.components-span{
border-left: 5px solid #409eff;
padding-left: 5px;
color: #409eff;
font-weight: bold;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment