Commit 9183753c authored by wangjiancheng's avatar wangjiancheng

Merge remote-tracking branch 'origin/dev' into dev

parents 73dc0099 3eda7149
...@@ -40,3 +40,10 @@ export function delMiddle(id) { ...@@ -40,3 +40,10 @@ export function delMiddle(id) {
method: 'delete', method: 'delete',
}) })
} }
export function InternationalParts(query) {
return request({
url: '/control/baseInternationalKeyComponentsDetail/getCriticalPartName',
method: 'get',
data: query,
})
}
...@@ -67,3 +67,10 @@ export function selectCanRelateLaw(query) { ...@@ -67,3 +67,10 @@ export function selectCanRelateLaw(query) {
data: [query], data: [query],
}) })
} }
export function domesticParts(query) {
return request({
url: '/control/partsName/CqcPartsNamelist',
method: 'get',
data: query,
})
}
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"order": "order", "order": "order",
"createTime": "Create Time", "createTime": "Create Time",
"updateTime": "Update Time", "updateTime": "Update Time",
"operation":"operation", "operation":"Operation",
"add": "add", "add": "add",
"handleUpdate": "Edit", "handleUpdate": "Edit",
"handleDelete": "Delete", "handleDelete": "Delete",
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
"responsibleDepartmentForTheGuaranteePlan": "保证计划书责任部门", "responsibleDepartmentForTheGuaranteePlan": "保证计划书责任部门",
"typeDescription": "类型描述", "typeDescription": "类型描述",
"secondaryTypeDescription": "二级类型描述", "secondaryTypeDescription": "二级类型描述",
"responsibleDepartment": "责任部门" "responsibleDepartment": "责任部门",
"project": "项目"
} }
...@@ -29,5 +29,6 @@ ...@@ -29,5 +29,6 @@
"responsibleDepartmentForTheGuaranteePlan": "Responsible department for the guarantee plan", "responsibleDepartmentForTheGuaranteePlan": "Responsible department for the guarantee plan",
"typeDescription": "Type Description", "typeDescription": "Type Description",
"secondaryTypeDescription": "Secondary Type Description", "secondaryTypeDescription": "Secondary Type Description",
"responsibleDepartment": "Responsible Department" "responsibleDepartment": "Responsible Department",
"project": "Project"
} }
\ No newline at end of file
...@@ -79,8 +79,7 @@ ...@@ -79,8 +79,7 @@
<div> <div>
<div class="baseInfoTitle"> <div class="baseInfoTitle">
<div style="line-height: 15px;"> <div style="line-height: 15px;">
{{cn.marketRegulationsList}} 本次普思认证提供的变更记录
</div> </div>
</div> </div>
<el-form v-model="queryParams" ref="queryRef" :inline="true" class="form-container"> <el-form v-model="queryParams" ref="queryRef" :inline="true" class="form-container">
...@@ -215,6 +214,18 @@ function getTopInfo(){ ...@@ -215,6 +214,18 @@ function getTopInfo(){
controlPlantableList.value.push(res.data) controlPlantableList.value.push(res.data)
}) })
} }
function handleQuery(){
queryParams.value.pageNum = 1
getList()
}
function resetQuery(){
queryParams.value ={
pageNum:1,
pageSize:10,
notificationId:id
}
getList()
}
//获取版本号等信息 //获取版本号等信息
function getVersionInfo(id){ function getVersionInfo(id){
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-form <el-form
v-show="showSearch" v-show="showSearch"
ref="queryRef" ref="partRef"
:model="queryParams" :model="queryParams"
:inline="true" :inline="true"
> >
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="`${cn.standardName}/${en.standardName}`" :label="`${cn.standardName}/${en.standardName}`"
prop="standardNumber" prop="standardName"
> >
<el-input <el-input
v-model="queryParams.standardName" v-model="queryParams.standardName"
...@@ -29,12 +29,20 @@ ...@@ -29,12 +29,20 @@
/> />
</el-form-item> </el-form-item>
<el-form-item :label="`${cn.partName}/${en.partName}`" prop="partName"> <el-form-item :label="`${cn.partName}/${en.partName}`" prop="partName">
<el-input <el-select
v-model="queryParams.partName" v-model="queryParams.partName"
:placeholder="`${cn.pleaseChoose}/${en.pleaseChoose}`" :placeholder="`${cn.pleaseChoose}/${en.pleaseChoose}`"
clearable clearable
@keyup.enter="handleQuery" filterable
style="width: 200px"
>
<el-option
v-for="item in partOptions"
:key="item"
:label="item"
:value="item"
/> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button style="width: 110px" class="btn-A" @click="handleQuery" <el-button style="width: 110px" class="btn-A" @click="handleQuery"
...@@ -160,12 +168,8 @@ ...@@ -160,12 +168,8 @@
clearable clearable
style="width: 200px" style="width: 200px"
> >
<el-option <el-option label="同步" :value="0" />
v-for="dict in parts_source" <el-option label="手动" :value="1" />
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -185,6 +189,14 @@ ...@@ -185,6 +189,14 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="80"> <el-table-column label="序号" align="center" width="80">
<template #header>
<div
style="display: flex; flex-direction: column; align-items: center"
>
<div>{{ cn.serialNumber }}</div>
<div>{{ en.serialNumber }}</div>
</div>
</template>
<template #default="scope"> <template #default="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template> </template>
...@@ -193,9 +205,35 @@ ...@@ -193,9 +205,35 @@
prop="criticalPartNameCn" prop="criticalPartNameCn"
label="零件名称" label="零件名称"
align="center" align="center"
/> >
<el-table-column prop="certificationBody" label="来源" align="center" /> <template #header>
<div
style="display: flex; flex-direction: column; align-items: center"
>
<div>{{ cn.partName }}</div>
<div>{{ en.partName }}</div>
</div>
</template>
</el-table-column>
<el-table-column prop="certificationBody" label="来源" align="center">
<template #header>
<div
style="display: flex; flex-direction: column; align-items: center"
>
<div>{{ cn.source }}</div>
<div>{{ en.source }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template #header>
<div
style="display: flex; flex-direction: column; align-items: center"
>
<div>{{ cn.operation }}</div>
<div>{{ en.operation }}</div>
</div>
</template>
<template #default="scope"> <template #default="scope">
<!-- 手动来源:显示可点击按钮 --> <!-- 手动来源:显示可点击按钮 -->
<el-button <el-button
...@@ -311,12 +349,8 @@ ...@@ -311,12 +349,8 @@
clearable clearable
style="width: 200px" style="width: 200px"
> >
<el-option <el-option label="同步" :value="0" />
v-for="dict in parts_source" <el-option label="手动" :value="1" />
:key="dict.value"
:label="dict.value"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -445,7 +479,7 @@ import { ...@@ -445,7 +479,7 @@ import {
partDetails, partDetails,
addBatchRelation, addBatchRelation,
selectCanRelateLaw, selectCanRelateLaw,
updateRelation, domesticParts,
delRelation, delRelation,
} from '@/api/RelationManagement/baseLawPartRelation' } from '@/api/RelationManagement/baseLawPartRelation'
...@@ -480,6 +514,25 @@ const currentStandardNo = ref('') ...@@ -480,6 +514,25 @@ const currentStandardNo = ref('')
const currentPartName = ref('') // 存储当前操作的零件名称 const currentPartName = ref('') // 存储当前操作的零件名称
const selectedLaws = ref([]) // 存储选中的法规数据 const selectedLaws = ref([]) // 存储选中的法规数据
const getRowKey = (row) => row.id // 假设每行有唯一id字段 const getRowKey = (row) => row.id // 假设每行有唯一id字段
const partOptions = ref([])
const partLoading = ref(false)
// 获取零件名称选项
const getPartOptions = async () => {
try {
partLoading.value = true
const res = await domesticParts({}) // 根据接口要求传递参数
if (res.code === 200) {
// 提取criticalPartNameCn并去重
partOptions.value = [
...new Set(res.data.map((item) => item.criticalPartNameCn)),
]
}
} catch (error) {
console.error('获取零件列表失败:', error)
} finally {
partLoading.value = false
}
}
const paginationStates = reactive({ const paginationStates = reactive({
// 主表格分页 // 主表格分页
mainTable: { mainTable: {
...@@ -607,6 +660,10 @@ function reset() { ...@@ -607,6 +660,10 @@ function reset() {
delFlag: null, delFlag: null,
partId: null, partId: null,
standardNumber: null, standardNumber: null,
standardName: null,
standardNo: null,
criticalPartNameCn: null,
partName: null,
} }
proxy.resetForm('partRef') proxy.resetForm('partRef')
} }
...@@ -624,7 +681,7 @@ function handleQuery1() { ...@@ -624,7 +681,7 @@ function handleQuery1() {
getSelectNoRelateLawPart() getSelectNoRelateLawPart()
} }
function resetQuery1() { function resetQuery1() {
proxy.resetForm('queryRef') proxy.resetForm('partRef')
handleQuery1() handleQuery1()
} }
function handleQuery2() { function handleQuery2() {
...@@ -632,12 +689,12 @@ function handleQuery2() { ...@@ -632,12 +689,12 @@ function handleQuery2() {
getPartDetail() getPartDetail()
} }
function resetQuery2() { function resetQuery2() {
proxy.resetForm('queryRef') proxy.resetForm('partRef')
handleQuery2() handleQuery2()
} }
/** 重置按钮操作 */ /** 重置按钮操作 */
function resetQuery() { function resetQuery() {
proxy.resetForm('queryRef') proxy.resetForm('partRef')
handleQuery() handleQuery()
} }
// 多选框选中数据 // 多选框选中数据
...@@ -826,4 +883,5 @@ function handleExport() { ...@@ -826,4 +883,5 @@ function handleExport() {
getList() getList()
getSelectNoRelatePart() getSelectNoRelatePart()
getPartOptions()
</script> </script>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-form <el-form
v-show="showSearch" v-show="showSearch"
ref="queryRef" ref="middleRef"
:model="queryParams" :model="queryParams"
:inline="true" :inline="true"
> >
...@@ -32,16 +32,24 @@ ...@@ -32,16 +32,24 @@
:label="`${cn.partName}/${en.partName}`" :label="`${cn.partName}/${en.partName}`"
prop="standardNumberId" prop="standardNumberId"
> >
<el-input <el-select
v-model="queryParams.standardNumberId" v-model="queryParams.partName"
:placeholder="`${cn.pleaseChoose}/${en.pleaseChoose}`" :placeholder="`${cn.pleaseChoose}/${en.pleaseChoose}`"
clearable clearable
@keyup.enter="handleQuery" filterable
style="width: 200px"
>
<el-option
v-for="(item, index) in partOptions"
:key="index"
:label="item"
:value="item"
/> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="`${cn.applicableMarket}/${en.applicableMarket}`" :label="`${cn.applicableMarket}/${en.applicableMarket}`"
prop="standardNumberId" prop="applicableMarket"
> >
<el-input <el-input
v-model="queryParams.applicableMarket" v-model="queryParams.applicableMarket"
...@@ -167,14 +175,12 @@ ...@@ -167,14 +175,12 @@
<!-- 维护类型描述抽屉 --> <!-- 维护类型描述抽屉 -->
<el-drawer v-model="open" :title="title" width="800px" append-to-body> <el-drawer v-model="open" :title="title" width="800px" append-to-body>
<el-form <el-form ref="middleRef" :model="queryParams" :rules="rules">
ref="middleRef"
:model="queryParams"
:rules="rules"
label-width="80px"
>
<el-row> <el-row>
<el-form-item label="项目" prop="typeDescription"> <el-form-item
:label="`${cn.project}/${en.project}`"
prop="typeDescription"
>
<el-input <el-input
v-model="queryParams.typeDescription" v-model="queryParams.typeDescription"
placeholder="请输入" placeholder="请输入"
...@@ -343,12 +349,16 @@ ...@@ -343,12 +349,16 @@
</el-dialog> </el-dialog>
<!-- 查看对应零件 --> <!-- 查看对应零件 -->
<el-drawer v-model="open2" :title="title" append-to-body> <el-drawer v-model="open2" :title="title" append-to-body>
<el-form ref="middleRef" :model="queryParams" label-width="70px"> <el-form ref="middleRef" :model="queryParams">
<el-row> <el-row>
<el-form-item label="零件名称" prop="criticalPartNameCn"> <el-form-item
:label="`${cn.partName}/${en.partName}`"
prop="criticalPartNameCn"
>
<el-input <el-input
v-model="queryParams.criticalPartNameCn" v-model="queryParams.criticalPartNameCn"
placeholder="请输入" :placeholder="`${cn.pleaseEnter}/${en.pleaseEnter}`"
clearable
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -426,6 +436,7 @@ import { ...@@ -426,6 +436,7 @@ import {
addMiddle, addMiddle,
updateMiddle, updateMiddle,
delMiddle, delMiddle,
InternationalParts,
} from '@/api/RelationManagement/baseLawPartCertificateMiddle' } from '@/api/RelationManagement/baseLawPartCertificateMiddle'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const { type_description, responsible_department } = proxy.useDict( const { type_description, responsible_department } = proxy.useDict(
...@@ -454,6 +465,7 @@ const currentStandardName = ref('') ...@@ -454,6 +465,7 @@ const currentStandardName = ref('')
const currentStandardNo = ref('') const currentStandardNo = ref('')
// 在父组件中定义当前行数据 // 在父组件中定义当前行数据
const currentRow = ref({}) const currentRow = ref({})
const partOptions = ref([])
// 修改后的数据部分 // 修改后的数据部分
const drawerData = ref({ const drawerData = ref({
open: false, open: false,
...@@ -475,6 +487,7 @@ const data = reactive({ ...@@ -475,6 +487,7 @@ const data = reactive({
standardNumberId: null, standardNumberId: null,
typeDescription: null, typeDescription: null,
secondaryTypeDescription: null, secondaryTypeDescription: null,
criticalPartNameCn: null,
department: null, department: null,
sort: null, sort: null,
}, },
...@@ -494,6 +507,17 @@ const data = reactive({ ...@@ -494,6 +507,17 @@ const data = reactive({
}) })
const { queryParams, form, rules } = toRefs(data) const { queryParams, form, rules } = toRefs(data)
// 获取下拉数据方法
const getPartOptions = async () => {
try {
const res = await InternationalParts()
if (res.code === 200) {
partOptions.value = res.data // 直接使用接口返回的数组
}
} catch (error) {
console.error('获取零件选项失败:', error)
}
}
function getList() { function getList() {
loading.value = true loading.value = true
listInternationalRelation(queryParams.value).then((response) => { listInternationalRelation(queryParams.value).then((response) => {
...@@ -521,7 +545,11 @@ function reset() { ...@@ -521,7 +545,11 @@ function reset() {
delFlag: null, delFlag: null,
partId: null, partId: null,
standardNumberId: null, standardNumberId: null,
standardName: null,
partName: null,
typeDescription: null, typeDescription: null,
applicableMarket: null,
criticalPartNameCn: null,
} }
proxy.resetForm('middleRef') proxy.resetForm('middleRef')
} }
...@@ -529,6 +557,7 @@ function reset() { ...@@ -529,6 +557,7 @@ function reset() {
/*查看零件详情抽屉*/ /*查看零件详情抽屉*/
function showPartDialog(row) { function showPartDialog(row) {
currentStandardName.value = row.standardName // 保存当前行的 standardName currentStandardName.value = row.standardName // 保存当前行的 standardName
currentStandardNo.value = row.standardNumber
open2.value = true // 打开对话框 open2.value = true // 打开对话框
this.title = `查看对应零件(${row.standardNumber},共${row.partCount}个零件)` // 设置对话框标题 this.title = `查看对应零件(${row.standardNumber},共${row.partCount}个零件)` // 设置对话框标题
getPartDetail(row) getPartDetail(row)
...@@ -536,8 +565,6 @@ function showPartDialog(row) { ...@@ -536,8 +565,6 @@ function showPartDialog(row) {
function getPartDetail(row) { function getPartDetail(row) {
// 2. 发起请求 // 2. 发起请求
loading.value = true loading.value = true
console.log('row', row)
currentStandardNo.value = row.standardNumber
partDetails({ partDetails({
...queryParams.value, ...queryParams.value,
standardNo: currentStandardNo.value, standardNo: currentStandardNo.value,
...@@ -567,10 +594,11 @@ function resetQuery() { ...@@ -567,10 +594,11 @@ function resetQuery() {
} }
function handleQuery1() { function handleQuery1() {
queryParams.value.pageNum = 1 queryParams.value.pageNum = 1
getPartDetail({ /*getPartDetail({
criticalPartNameCn: queryParams.value.criticalPartNameCn, criticalPartNameCn: queryParams.value.criticalPartNameCn,
standardNo: currentStandardNo.value, // 确保此处已赋值 standardNo: currentStandardNo.value, // 确保此处已赋值
}) })*/
getPartDetail()
} }
/** 重置按钮操作 */ /** 重置按钮操作 */
...@@ -756,4 +784,5 @@ function colseDialogOpen1() { ...@@ -756,4 +784,5 @@ function colseDialogOpen1() {
open1.value = false open1.value = false
} }
getList() getList()
getPartOptions()
</script> </script>
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