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