Commit 73b0a9d7 authored by 祁正's avatar 祁正

通知单管理-列表

parent 9ae35479
......@@ -44,3 +44,11 @@ export function insert(data) {
data:data
})
}
// 获取列表
export function list(data) {
return request({
url: '/control/notificationManagement/list',
method: 'get',
params:data
})
}
......@@ -113,24 +113,34 @@
<el-table :data="tableList">
<el-table-column type="index" width="55" align="center" label="序号"/>
<el-table-column label="序号" align="center" prop="applicableBrand" />
<el-table-column label="通知单编号" align="center" prop="listCode" >
<el-table-column label="通知单编号" align="center" prop="notificationNumber" >
</el-table-column>
<el-table-column label="认证机构" align="center" prop="createUserName" />
<el-table-column label="事业部" align="center" prop="createTime" />
<el-table-column label="品牌" align="center" prop="updateUserName" />
<el-table-column label="车型代码" align="center" prop="updateTime" />
<el-table-column label="车型系列" align="center" prop="updateTime" />
<el-table-column label="车型代码" align="center" prop="updateTime" />
<el-table-column label="生产地址" align="center" prop="updateTime" />
<el-table-column label="车型公告号" align="center" prop="updateTime" />
<el-table-column label="变更类型" align="center" prop="updateTime" />
<el-table-column label="认证负责人" align="center" prop="updateTime" />
<el-table-column label="批准日期" align="center" prop="updateTime" />
<el-table-column label="通知单状态" align="center" prop="updateTime" />
<el-table-column label="创建人" align="center" prop="updateTime" />
<el-table-column label="批准人" align="center" prop="updateTime" />
<el-table-column label="认证机构" align="center" prop="certificationBody" />
<el-table-column label="事业部" align="center" prop="businessUnitName" />
<el-table-column label="品牌" align="center" prop="brand" />
<el-table-column label="车型代码" align="center" prop="vehicleModelCode" />
<el-table-column label="车型系列" align="center" prop="vehicleSeries" >
<template #default="scope">
<dict-tag :options="getDictList(scope.row.vehicleSeries)?vehicle_model_series_icar:vehicle_model_series" :value="scope.row.vehicleSeries" />
</template>
</el-table-column>
<el-table-column label="生产地址" align="center" prop="productionAddress" width="150" />
<el-table-column label="车型公告号" align="center" prop="vehicleAnnouncementNumber" >
<template #default="scope">
<span>{{}}</span>
</template>
</el-table-column>
<el-table-column label="变更类型" align="center" prop="changeType" />
<el-table-column label="认证负责人" align="center" prop="certificationResponsiblePerson" />
<el-table-column label="批准日期" align="center" prop="approvalDate" />
<el-table-column label="通知单状态" align="center" prop="notificationStatus" >
<template #default="scope">
<dict-tag :options="notification_status" :value="scope.row.notificationStatus" />
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createUserName" />
<el-table-column label="批准人" align="center" prop="ApprovalUserName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
......@@ -139,7 +149,13 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 抽屉-->
<el-drawer @close="drawerColse" v-model="drawer">
......@@ -273,7 +289,7 @@
</el-col>
<el-col :offset="1" :span="5">
<el-button type="primary" icon="User" class="btn-C" plain>选择用户</el-button>
<el-button type="primary" icon="User" @click="singleOpenDialog" class="btn-C" plain>选择用户</el-button>
</el-col>
</el-row>
......@@ -285,7 +301,7 @@
</el-col>
<el-col :offset="1" :span="5">
<el-button type="primary" icon="User" class="btn-C" plain>选择用户</el-button>
<el-button type="primary" icon="User" @click="openDialog" class="btn-C" plain>选择用户</el-button>
</el-col>
</el-row>
</el-form>
......@@ -301,24 +317,27 @@
<!-- <select-role-->
<!-- v-model="selectRole"-->
<!-- :dept-list="userList"-->
<!-- name-key="nickName"-->
<!-- dept-key="dept"-->
<!-- :selection-mode="selectType"-->
<!-- @submit="handleSelectionSubmit"-->
<!-- @close="() => selectRole = false"-->
<!-- />-->
<select-role
v-if="userList.length > 0"
v-model="selectRole"
:dept-list="userList"
name-key="nickName"
dept-key="dept"
:selection-mode="selectType"
@submit="handleSelectionSubmit"
@close="() => selectRole = false"
/>
</div>
</template>
<script setup>
import SelectRole from "@/components/SelectRole/index.vue"
import {getUnitList,brandData,getALLManufacturerList,getAllModelCode,getALLUserList,insert} from "@/api/notificationManagement/list.js"
import {getUnitList,brandData,getALLManufacturerList,getAllModelCode,getALLUserList,insert,list} from "@/api/notificationManagement/list.js"
import { ref } from "vue";
import { ElMessage } from 'element-plus'
const { proxy } = getCurrentInstance();
const { certification_body } = proxy.useDict('certification_body')
const { certification_body
} = proxy.useDict('certification_body')
const { notification_status } = proxy.useDict('notification_status')
//车型系列-事业部icar才能选这个
const { vehicle_model_series_icar } = proxy.useDict('vehicle_model_series_icar')
//车型系列-除了事业部icar选这个
......@@ -333,7 +352,7 @@ const selectType = ref('multiple') //默认多选
const vehicleModelSeriesList = ref([])
const addressList = ref([])
const drawer = ref(false)
const total = ref(0)
const unitList = ref([])
const brandList = ref([])
const drawerQueryParams = ref({
......@@ -384,7 +403,6 @@ const rules = ref({
function confirmClick(formRef) {
drawerQueryRef.value.validate((valid) => {
if (valid) {
console.log(drawerQueryParams.value);
insert(drawerQueryParams.value).then(res=>{
console.log("新增结果",res)
if(res.code === 200){
......@@ -393,7 +411,6 @@ function confirmClick(formRef) {
}
})
} else {
console.log('表单验证失败');
return false;
}
});
......@@ -405,6 +422,17 @@ function getUnitDataList(){
})
}
function getDictList(v){
//车型系列-除了事业部icar选这个
let a = toRaw(toRaw(vehicle_model_series_icar)._object).vehicle_model_series_icar
console.log("a",a)
// let b = toValue(vehicle_model_series)
if(a.find(item => item.value === v)) {
return true
}else return false
}
//获取品牌列表
function getBrandDataList(){
brandData().then(res=>{
......@@ -413,7 +441,6 @@ function getBrandDataList(){
}
function onChange(){
console.log(drawerQueryParams.value.businessDivisionId)
let id = drawerQueryParams.value.businessDivisionId
drawerQueryParams.value.vehicleSeries = null
//icak的id(暂时)
......@@ -424,7 +451,6 @@ function onChange(){
vehicleModelSeriesList.value =toValue(vehicle_model_series)
}
console.log(vehicleModelSeriesList.value)
}
//多选
......@@ -441,7 +467,6 @@ const singleOpenDialog = () => {
//获取所有制造商数据-生产地址
function getALLManufacturerDataList(){
getALLManufacturerList().then(res=>{
console.log(res)
addressList.value = res.data
})
}
......@@ -449,6 +474,17 @@ function drawerColse(){
drawerQueryRef.value.resetFields()
}
//获取列表
function getList(){
console.log("查询参数",queryParams.value)
list(queryParams.value).then(res=>{
console.log(res)
tableList.value = res.rows
total.value = res.total
})
}
//获取所有车型代码
function getALLModelCodeList(){
getAllModelCode().then(res=>{
......@@ -473,10 +509,10 @@ const handleSelectionSubmit = (selectedItems) => {
//获取所有人员
function getALLUserDeptList(){
getALLUserList().then(res=>{
console.log("人员",res.data)
userList.value = res.data
})
}
getList()
getALLUserDeptList()
getALLModelCodeList()
getALLManufacturerDataList()
......@@ -499,4 +535,13 @@ getBrandDataList()
padding-bottom: 20px;
background-color: rgb(245, 245, 245);
}
:deep(.el-pagination) {
display: flex;
justify-content: center;
width: 100%;
margin-top: 24px;
}
:deep(.el-pagination.is-background .el-pager li.is-active){
background-color: #0154FB;
}
</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