diff --git a/src/views/qms/aql/index.vue b/src/views/qms/aql/index.vue
index c74fe3459..3dc399dba 100644
--- a/src/views/qms/aql/index.vue
+++ b/src/views/qms/aql/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -55,12 +63,17 @@
-
+
diff --git a/src/views/qms/counter/index.vue b/src/views/qms/counter/index.vue
index cd789a436..d57b19136 100644
--- a/src/views/qms/counter/index.vue
+++ b/src/views/qms/counter/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -54,12 +59,17 @@
-
+
diff --git a/src/views/qms/dynamicRule/index.vue b/src/views/qms/dynamicRule/index.vue
index 951326cc8..72b59a060 100644
--- a/src/views/qms/dynamicRule/index.vue
+++ b/src/views/qms/dynamicRule/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -60,15 +68,15 @@
import download from '@/utils/download'
-import { DynamicRule,DynamicRuleRules } from './dynamicRule.data'
-import { InspectionStage,InspectionStageRules } from '../inspectionStage/inspectionStage.data'
+import { DynamicRule, DynamicRuleRules } from './dynamicRule.data'
+import { InspectionStage, InspectionStageRules } from '../inspectionStage/inspectionStage.data'
import * as DynamicRuleApi from '@/api/qms/dynamicRule'
import * as InspectionStageApi from '@/api/qms/inspectionStage'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import UploadFile from '@/components/UploadFile/src/UploadFile.vue'
import { checkPermi } from '@/utils/permission'
-import ImportForm from "../../../components/ImportForm/src/ImportForm.vue";
+import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
@@ -141,12 +149,12 @@ const { getList, setSearchParams } = tableMethods
// 列表头部按钮
const HeadButttondata = [
- defaultButtons.defaultAddBtn({hasPermi:'qms:dynamic-rule:create'}), // 新增
- defaultButtons.defaultImportBtn({hasPermi:'qms:dynamic-rule:import'}), // 导入
- defaultButtons.defaultExportBtn({hasPermi:'qms:dynamic-rule:export'}), // 导出
+ defaultButtons.defaultAddBtn({ hasPermi: 'qms:dynamic-rule:create' }), // 新增
+ defaultButtons.defaultImportBtn({ hasPermi: 'qms:dynamic-rule:import' }), // 导入
+ defaultButtons.defaultExportBtn({ hasPermi: 'qms:dynamic-rule:export' }), // 导出
defaultButtons.defaultFreshBtn(null), // 刷新
defaultButtons.defaultFilterBtn(null), // 筛选
- defaultButtons.defaultSetBtn(null), // 设置
+ defaultButtons.defaultSetBtn(null) // 设置
// {
// label: '自定义扩展按钮',
// name: 'zdy',
@@ -159,21 +167,27 @@ const HeadButttondata = [
// 头部按钮事件
const buttonBaseClick = (val, item) => {
- if (val == 'add') { // 新增
+ if (val == 'add') {
+ // 新增
openForm('create')
- } else if (val == 'import') { // 导入
+ } else if (val == 'import') {
+ // 导入
handleImport()
- } else if (val == 'export') { // 导出
+ } else if (val == 'export') {
+ // 导出
handleExport()
- } else if (val == 'refresh') { // 刷新
+ } else if (val == 'refresh') {
+ // 刷新
getList()
- } else if (val == 'filtrate') { // 筛选
- } else { // 其他按钮
+ } else if (val == 'filtrate') {
+ // 筛选
+ } else {
+ // 其他按钮
console.log('其他按钮', item)
}
}
-const isShowMainButton = (row,val) => {
+const isShowMainButton = (row, val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
@@ -183,22 +197,30 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
- defaultButtons.mainListEditBtn({hasPermi: 'qms:dynamic-rule:update'}),
- defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:dynamic-rule:enable'}),
- defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:dynamic-rule:disable' }),
- defaultButtons.mainListDeleteBtn({hasPermi:'qms:dynamic-rule:delete'}), // 删除
+ defaultButtons.mainListEditBtn({ hasPermi: 'qms:dynamic-rule:update' }),
+ defaultButtons.mainListEnableBtn({
+ hide: isShowMainButton(row, ['FALSE']),
+ hasPermi: 'qms:dynamic-rule:enable'
+ }),
+ defaultButtons.mainListDisableBtn({
+ hide: isShowMainButton(row, ['TRUE']),
+ hasPermi: 'qms:dynamic-rule:disable'
+ }),
+ defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:dynamic-rule:delete' }) // 删除
]
}
// 列表-操作按钮事件
const buttonTableClick = async (val, row) => {
- if (val == 'edit') { // 编辑
+ if (val == 'edit') {
+ // 编辑
editForm('update', row)
- } else if (val == 'delete') { // 删除
+ } else if (val == 'delete') {
+ // 删除
handleDelete(row.id)
- }else if (val == 'enable') {
+ } else if (val == 'enable') {
handleEnable(row.id)
- }else if (val == 'disable') {
+ } else if (val == 'disable') {
handleDisable(row.id)
}
}
@@ -212,33 +234,39 @@ const openForm = async (type: string, row?: any) => {
const editForm = async (type: string, row?: any) => {
tableData.value = []
detailMasterId.value = row.id
- InspectionStageApi.getInspectionStageNoPage({masterId:row.id}).then(res=>{
+ InspectionStageApi.getInspectionStageNoPage({ masterId: row.id }).then((res) => {
tableData.value = res
})
basicFormRef.value.open(type, row)
}
// form表单提交
-const formsSuccess = async (formType,data) => {
- var isHave =DynamicRule.allSchemas.formSchema.some(function (item) {
- return item.field === 'activeTime' || item.field === 'expireTime';
- });
- if(isHave){
- if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
- message.error('失效时间要大于生效时间')
- return;
+const formsSuccess = async (formType, data) => {
+ try {
+ var isHave = DynamicRule.allSchemas.formSchema.some(function (item) {
+ return item.field === 'activeTime' || item.field === 'expireTime'
+ })
+ if (isHave) {
+ if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
+ message.error('失效时间要大于生效时间')
+ return
+ }
}
+ if (data.activeTime == 0) data.activeTime = null
+ if (data.expireTime == 0) data.expireTime = null
+ basicFormRef.value.formLoading = true
+ if (formType === 'create') {
+ await DynamicRuleApi.createDynamicRule(data)
+ message.success(t('common.createSuccess'))
+ } else {
+ await DynamicRuleApi.updateDynamicRule(data)
+ message.success(t('common.updateSuccess'))
+ }
+ basicFormRef.value.dialogVisible = false
+ basicFormRef.value.formLoading = false
+ getList()
+ } catch {
+ basicFormRef.value.formLoading = false
}
- if(data.activeTime==0)data.activeTime = null;
- if(data.expireTime==0)data.expireTime = null;
- if (formType === 'create') {
- await DynamicRuleApi.createDynamicRule(data)
- message.success(t('common.createSuccess'))
- } else {
- await DynamicRuleApi.updateDynamicRule(data)
- message.success(t('common.updateSuccess'))
- }
- basicFormRef.value.dialogVisible = false
- getList()
}
/** 详情操作 */
@@ -331,23 +359,23 @@ const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
-
// 主子数据 提交
const submitForm = async (formType, data) => {
- const flag = validateNotRepetition(tableData.value);
- const emptyFlag = validateDetailEmpty(tableData.value);
- if(!emptyFlag){
+ const flag = validateNotRepetition(tableData.value)
+ const emptyFlag = validateDetailEmpty(tableData.value)
+ if (!emptyFlag) {
message.alertWarning('明细不能为空')
basicFormRef.value.formLoading = false
return
}
- if(!flag){
+ if (!flag) {
message.alertWarning('动态规则阶段不能重复')
basicFormRef.value.formLoading = false
return
}
- data.inspectionStageDOList = tableData.value// 拼接子表数据参数
+ data.inspectionStageDOList = tableData.value // 拼接子表数据参数
try {
+ basicFormRef.value.formLoading = true
if (formType === 'create') {
await DynamicRuleApi.createDynamicRule(data)
message.success(t('common.createSuccess'))
@@ -356,6 +384,7 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
+ basicFormRef.value.formLoading = false
// 刷新当前列表
getList()
} finally {
@@ -363,9 +392,9 @@ const submitForm = async (formType, data) => {
}
}
-const detailValidate = (type,data) => {
- let tag = true;
- if(!validateIfRepeat(type,data)){
+const detailValidate = (type, data) => {
+ let tag = true
+ if (!validateIfRepeat(type, data)) {
tag = false
message.alertWarning('动态规则阶段不能重复')
}
@@ -374,49 +403,49 @@ const detailValidate = (type,data) => {
const detailOpenForm = (type, row, masterParmas) => {
detailMasterId.value = masterParmas.masterId
- InspectionStageApi.getInspectionStageNoPage({masterId:masterParmas.masterId}).then(res=>{
+ InspectionStageApi.getInspectionStageNoPage({ masterId: masterParmas.masterId }).then((res) => {
detailList.value = res
})
}
-const validateIfRepeat = (type,data) => {
- let mergedArray: any[] = [];
- if(type == 'create'){
- mergedArray = [data, ...detailList.value];
- }if(type == 'update'){
- detailList.value = detailList.value.filter(item => item.id !== data.id);
- mergedArray = [data, ...detailList.value];
+const validateIfRepeat = (type, data) => {
+ let mergedArray: any[] = []
+ if (type == 'create') {
+ mergedArray = [data, ...detailList.value]
+ }
+ if (type == 'update') {
+ detailList.value = detailList.value.filter((item) => item.id !== data.id)
+ mergedArray = [data, ...detailList.value]
}
- const stageSet = new Set(mergedArray.map(item => item.stage));
- return stageSet.size === mergedArray.length;
+ const stageSet = new Set(mergedArray.map((item) => item.stage))
+ return stageSet.size === mergedArray.length
}
const validateDetailEmpty = (data) => {
- const codes = data.map(item => item.stage);
- if(codes.length == 0){
- return false;
+ const codes = data.map((item) => item.stage)
+ if (codes.length == 0) {
+ return false
}
- return true;
+ return true
}
const validateNotRepetition = (data) => {
// 提取所有的 dictionaryTypeAndCode 值
- const codes = data.map(item => item.stage);
+ const codes = data.map((item) => item.stage)
// 创建一个 Set 来存储唯一的 dictionaryTypeAndCode 值
- const uniqueCodes = new Set(codes);
+ const uniqueCodes = new Set(codes)
// 如果原始数组的长度大于 Set 集合的大小,则说明有重复
if (codes.length > uniqueCodes.size) {
- return false; // 发现重复,返回 false
+ return false // 发现重复,返回 false
}
- return true; // 未发现重复,返回 true
-};
+ return true // 未发现重复,返回 true
+}
/** 初始化 **/
onMounted(async () => {
- tableObject.params = {
- available: true
- }
+ tableObject.params = {
+ available: true
+ }
getList()
importTemplateData.templateUrl = await DynamicRuleApi.importTemplate()
})
-
diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue
index 3c188f9dd..df041bc5b 100644
--- a/src/views/qms/inspectionJob/index.vue
+++ b/src/views/qms/inspectionJob/index.vue
@@ -389,6 +389,7 @@ const tableData = ref([])
const submitForm = async (formType, data) => {
// return
try {
+ formRef.value.formLoading = true
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
@@ -397,6 +398,7 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
+ formRef.value.formLoading = false
// 刷新当前列表
getList()
} finally {
diff --git a/src/views/qms/inspectionMethod/index.vue b/src/views/qms/inspectionMethod/index.vue
index 29a9a5cd0..0fd66b4a8 100644
--- a/src/views/qms/inspectionMethod/index.vue
+++ b/src/views/qms/inspectionMethod/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -42,12 +50,14 @@
import download from '@/utils/download'
-import { InspectionMethod,InspectionMethodRules } from './inspectionMethod.data'
+import { InspectionMethod, InspectionMethodRules } from './inspectionMethod.data'
import * as InspectionMethodApi from '@/api/qms/inspectionMethod'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
@@ -113,12 +123,12 @@ const { getList, setSearchParams } = tableMethods
// 列表头部按钮
const HeadButttondata = [
- defaultButtons.defaultAddBtn({hasPermi:'qms:inspection-method:create'}), // 新增
- defaultButtons.defaultImportBtn({hasPermi:'qms:inspection-method:import'}), // 导入
- defaultButtons.defaultExportBtn({hasPermi:'qms:inspection-method:export'}), // 导出
+ defaultButtons.defaultAddBtn({ hasPermi: 'qms:inspection-method:create' }), // 新增
+ defaultButtons.defaultImportBtn({ hasPermi: 'qms:inspection-method:import' }), // 导入
+ defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-method:export' }), // 导出
defaultButtons.defaultFreshBtn(null), // 刷新
defaultButtons.defaultFilterBtn(null), // 筛选
- defaultButtons.defaultSetBtn(null), // 设置
+ defaultButtons.defaultSetBtn(null) // 设置
// {
// label: '自定义扩展按钮',
// name: 'zdy',
@@ -131,21 +141,27 @@ const HeadButttondata = [
// 头部按钮事件
const buttonBaseClick = (val, item) => {
- if (val == 'add') { // 新增
+ if (val == 'add') {
+ // 新增
openForm('create')
- } else if (val == 'import') { // 导入
+ } else if (val == 'import') {
+ // 导入
handleImport()
- } else if (val == 'export') { // 导出
+ } else if (val == 'export') {
+ // 导出
handleExport()
- } else if (val == 'refresh') { // 刷新
+ } else if (val == 'refresh') {
+ // 刷新
getList()
- } else if (val == 'filtrate') { // 筛选
- } else { // 其他按钮
+ } else if (val == 'filtrate') {
+ // 筛选
+ } else {
+ // 其他按钮
console.log('其他按钮', item)
}
}
-const isShowMainButton = (row,val) => {
+const isShowMainButton = (row, val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
@@ -155,22 +171,30 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
- defaultButtons.mainListEditBtn({hasPermi: 'qms:inspection-method:update'}),
- defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:inspection-method:enable'}),
- defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:inspection-method:disable' }),
- defaultButtons.mainListDeleteBtn({hasPermi:'qms:inspection-method:delete'}), // 删除
+ defaultButtons.mainListEditBtn({ hasPermi: 'qms:inspection-method:update' }),
+ defaultButtons.mainListEnableBtn({
+ hide: isShowMainButton(row, ['FALSE']),
+ hasPermi: 'qms:inspection-method:enable'
+ }),
+ defaultButtons.mainListDisableBtn({
+ hide: isShowMainButton(row, ['TRUE']),
+ hasPermi: 'qms:inspection-method:disable'
+ }),
+ defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:inspection-method:delete' }) // 删除
]
}
// 列表-操作按钮事件
const buttonTableClick = async (val, row) => {
- if (val == 'edit') { // 编辑
+ if (val == 'edit') {
+ // 编辑
openForm('update', row)
- } else if (val == 'delete') { // 删除
+ } else if (val == 'delete') {
+ // 删除
handleDelete(row.id)
- }else if (val == 'enable') {
+ } else if (val == 'enable') {
handleEnable(row.id)
- }else if (val == 'disable') {
+ } else if (val == 'disable') {
handleDisable(row.id)
}
}
@@ -178,7 +202,7 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
- if(row && row.videoAddress?.trim()){
+ if (row && row.videoAddress?.trim()) {
row.filePathList = row.videoAddress.split(',')
}
@@ -190,39 +214,47 @@ const openForm = (type: string, row?: any) => {
}
})
}
- if(type=='create'){
+ if (type == 'create') {
const currentTime = new Date().getTime()
- const fileId = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='fileId')
- const uploadFile = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='videoAddress')
- if(fileId){
+ const fileId = InspectionMethod.allSchemas.formSchema.find((item) => item.field == 'fileId')
+ const uploadFile = InspectionMethod.allSchemas.formSchema.find(
+ (item) => item.field == 'videoAddress'
+ )
+ if (fileId) {
fileId['value'] = currentTime
}
- if(uploadFile){
+ if (uploadFile) {
uploadFile['componentProps']['upData']['tableId'] = currentTime
- uploadFile['componentProps']['modelValue']= []
+ uploadFile['componentProps']['modelValue'] = []
}
- }else if(type=='update'){
- const uploadFile = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='videoAddress')
- uploadFile['componentProps']['modelValue']= row.filePathListView
-
+ } else if (type == 'update') {
+ const uploadFile = InspectionMethod.allSchemas.formSchema.find(
+ (item) => item.field == 'videoAddress'
+ )
+ uploadFile['componentProps']['modelValue'] = row.filePathListView
}
basicFormRef.value.open(type, row)
}
// form表单提交
-const formsSuccess = async (formType,data) => {
- if (formType === 'create') {
-
- delete data['uploadFile']
- await InspectionMethodApi.createInspectionMethod(data)
- message.success(t('common.createSuccess'))
- } else {
- // debugger
- await InspectionMethodApi.updateInspectionMethod(data)
- message.success(t('common.updateSuccess'))
+const formsSuccess = async (formType, data) => {
+ try {
+ basicFormRef.value.formLoading = true
+ if (formType === 'create') {
+ delete data['uploadFile']
+ await InspectionMethodApi.createInspectionMethod(data)
+ message.success(t('common.createSuccess'))
+ } else {
+ // debugger
+ await InspectionMethodApi.updateInspectionMethod(data)
+ message.success(t('common.updateSuccess'))
+ }
+ basicFormRef.value.dialogVisible = false
+ basicFormRef.value.formLoading = false
+ getList()
+ } finally {
+ basicFormRef.value.formLoading = false
}
- basicFormRef.value.dialogVisible = false
- getList()
}
/** 详情操作 */
@@ -302,11 +334,10 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
- tableObject.params = {
- available: true
- }
+ tableObject.params = {
+ available: true
+ }
getList()
importTemplateData.templateUrl = await InspectionMethodApi.importTemplate()
})
-
diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue
index 84d0b942a..df2442aed 100644
--- a/src/views/qms/inspectionRecordFirst/index.vue
+++ b/src/views/qms/inspectionRecordFirst/index.vue
@@ -244,6 +244,7 @@ const handleMainExport = async (row: any) => {
const submitForm = async (formType, data) => {
// data.subList = tableData.value // 拼接子表数据参数
try {
+ basicFormRef.value.formLoading = true
if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess'))
@@ -252,6 +253,7 @@ const handleMainExport = async (row: any) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
+ basicFormRef.value.formLoading = false
// 刷新当前列表
getList()
} finally {
diff --git a/src/views/qms/inspectionRequest/index.vue b/src/views/qms/inspectionRequest/index.vue
index 0d2adf9f3..6e1351e10 100644
--- a/src/views/qms/inspectionRequest/index.vue
+++ b/src/views/qms/inspectionRequest/index.vue
@@ -1,375 +1,456 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ row.number }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/qms/inspectionScheme/index.vue b/src/views/qms/inspectionScheme/index.vue
index e385e67c2..858856700 100644
--- a/src/views/qms/inspectionScheme/index.vue
+++ b/src/views/qms/inspectionScheme/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
-
+
{{ row.reqCode }}
-
+
@@ -60,16 +68,21 @@
diff --git a/src/views/qms/inspectionStage/index.vue b/src/views/qms/inspectionStage/index.vue
index dcbbb196a..ac7db008e 100644
--- a/src/views/qms/inspectionStage/index.vue
+++ b/src/views/qms/inspectionStage/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -54,12 +59,17 @@
-
+
diff --git a/src/views/qms/inspectionTemplate/index.vue b/src/views/qms/inspectionTemplate/index.vue
index 2b4151705..3a506ec9c 100644
--- a/src/views/qms/inspectionTemplate/index.vue
+++ b/src/views/qms/inspectionTemplate/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
-
+
{{ row.reqCode }}
-
+
@@ -49,11 +57,7 @@
@submitForm="submitForm"
/>
-
+
import download from '@/utils/download'
-import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from './inspectionTemplate.data'
+import {
+ InspectionTemplateMain,
+ InspectionTemplateProcess,
+ InspectionTemplateFeatures,
+ InspectionTemplateRules
+} from './inspectionTemplate.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
@@ -101,12 +110,12 @@ const { getList, setSearchParams } = tableMethods
// 列表头部按钮
const HeadButttondata = [
- defaultButtons.defaultAddBtn({hasPermi:'qms:programme-template:create'}), // 新增
- defaultButtons.defaultImportBtn({hasPermi:'qms:programme-template:import'}), // 导入
- defaultButtons.defaultExportBtn({hasPermi:'qms:programme-template:export'}), // 导出
+ defaultButtons.defaultAddBtn({ hasPermi: 'qms:programme-template:create' }), // 新增
+ defaultButtons.defaultImportBtn({ hasPermi: 'qms:programme-template:import' }), // 导入
+ defaultButtons.defaultExportBtn({ hasPermi: 'qms:programme-template:export' }), // 导出
defaultButtons.defaultFreshBtn(null), // 刷新
defaultButtons.defaultFilterBtn(null), // 筛选
- defaultButtons.defaultSetBtn(null), // 设置
+ defaultButtons.defaultSetBtn(null) // 设置
// {
// label: '自定义扩展按钮',
// name: 'zdy',
@@ -119,16 +128,22 @@ const HeadButttondata = [
// 头部按钮事件
const buttonBaseClick = (val, item) => {
- if (val == 'add') { // 新增
+ if (val == 'add') {
+ // 新增
openForm('create')
- } else if (val == 'import') { // 导入
+ } else if (val == 'import') {
+ // 导入
handleImport()
- } else if (val == 'export') { // 导出
+ } else if (val == 'export') {
+ // 导出
handleExport()
- } else if (val == 'refresh') { // 刷新
+ } else if (val == 'refresh') {
+ // 刷新
getList()
- } else if (val == 'filtrate') { // 筛选
- } else { // 其他按钮
+ } else if (val == 'filtrate') {
+ // 筛选
+ } else {
+ // 其他按钮
console.log('其他按钮', item)
}
}
@@ -149,7 +164,7 @@ const handleExport = async () => {
}
}
-const isShowMainButton = (row,val) => {
+const isShowMainButton = (row, val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
@@ -159,25 +174,33 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
- defaultButtons.mainListEditBtn({hasPermi: 'qms:programme-template:update'}),
- defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:programme-template:enable'}),
- defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:programme-template:disable'}),
+ defaultButtons.mainListEditBtn({ hasPermi: 'qms:programme-template:update' }),
+ defaultButtons.mainListEnableBtn({
+ hide: isShowMainButton(row, ['FALSE']),
+ hasPermi: 'qms:programme-template:enable'
+ }),
+ defaultButtons.mainListDisableBtn({
+ hide: isShowMainButton(row, ['TRUE']),
+ hasPermi: 'qms:programme-template:disable'
+ }),
defaultButtons.mainCopyBtn({ hasPermi: 'qms:programme-template:copy' }),
- defaultButtons.mainListDeleteBtn({hasPermi:'qms:programme-template:delete'}), // 删除
+ defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:programme-template:delete' }) // 删除
]
}
// 列表-操作按钮事件
const buttonTableClick = async (val, row) => {
- if (val == 'edit') { // 编辑
+ if (val == 'edit') {
+ // 编辑
openForm('update', row)
- } else if (val == 'delete') { // 删除
+ } else if (val == 'delete') {
+ // 删除
handleDelete(row.id)
- }else if (val == 'enable') {
+ } else if (val == 'enable') {
handleEnable(row.id)
- }else if (val == 'disable') {
+ } else if (val == 'disable') {
handleDisable(row.id)
- }else if (val == 'copy') {
+ } else if (val == 'copy') {
openForm('create', row)
}
}
@@ -189,16 +212,22 @@ const openForm = (type: string, row?: any) => {
}
// form表单提交
-const submitForm = async (formType,data) => {
- if (formType === 'create') {
- await InspectionProcessPageApi.inspectionTemplateCreat(data.value)
- message.success(t('common.createSuccess'))
- } else {
- await InspectionProcessPageApi.inspectionTemplateUpdate(data.value)
- message.success(t('common.updateSuccess'))
+const submitForm = async (formType, data) => {
+ try {
+ basicFormRef.value.formLoading = true
+ if (formType === 'create') {
+ await InspectionProcessPageApi.inspectionTemplateCreat(data.value)
+ message.success(t('common.createSuccess'))
+ } else {
+ await InspectionProcessPageApi.inspectionTemplateUpdate(data.value)
+ message.success(t('common.updateSuccess'))
+ }
+ basicFormRef.value.dialogVisible = false
+ basicFormRef.value.formLoading = false
+ getList()
+ } finally {
+ basicFormRef.value.formLoading = false
}
- basicFormRef.value.dialogVisible = false
- getList()
}
/** 详情操作 */
@@ -263,11 +292,10 @@ const importSuccess = () => {
/** 初始化 **/
onMounted(async () => {
- tableObject.params = {
- available: true
- }
+ tableObject.params = {
+ available: true
+ }
getList()
importTemplateData.templateUrl = await InspectionProcessPageApi.importTemplate()
})
-
diff --git a/src/views/qms/qualityNotice/index.vue b/src/views/qms/qualityNotice/index.vue
index 064613a52..56a0ff62f 100644
--- a/src/views/qms/qualityNotice/index.vue
+++ b/src/views/qms/qualityNotice/index.vue
@@ -184,6 +184,7 @@
// 主子数据 提交
const submitForm = async (formType, data) => {
try {
+ formRef.value.formLoading = true
if (formType === 'create') {
await qualityNoticeApi.qualityNoticeCreat(data)
message.success(t('common.createSuccess'))
@@ -192,6 +193,7 @@
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
+ formRef.value.formLoading = false
// 刷新当前列表
getList()
} finally {
diff --git a/src/views/qms/sampleCode/index.vue b/src/views/qms/sampleCode/index.vue
index 38ed151c0..9288e264f 100644
--- a/src/views/qms/sampleCode/index.vue
+++ b/src/views/qms/sampleCode/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -55,12 +63,17 @@
-
+
diff --git a/src/views/qms/samplingProcess/index.vue b/src/views/qms/samplingProcess/index.vue
index 7733e50c5..1d5254334 100644
--- a/src/views/qms/samplingProcess/index.vue
+++ b/src/views/qms/samplingProcess/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -68,13 +76,13 @@
diff --git a/src/views/qms/samplingScheme/index.vue b/src/views/qms/samplingScheme/index.vue
index 01c52c11a..cddeb98d1 100644
--- a/src/views/qms/samplingScheme/index.vue
+++ b/src/views/qms/samplingScheme/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -54,12 +62,17 @@
-
+
diff --git a/src/views/qms/selectedProject/index.vue b/src/views/qms/selectedProject/index.vue
index 9ab2bce19..1e5442f4d 100644
--- a/src/views/qms/selectedProject/index.vue
+++ b/src/views/qms/selectedProject/index.vue
@@ -1,18 +1,22 @@
-
+
-
-
+
+
@@ -27,13 +31,13 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
-
+
{{ row.code }}
-
+
@@ -54,12 +58,17 @@
-
+
diff --git a/src/views/qms/selectedSet/index.vue b/src/views/qms/selectedSet/index.vue
index c3e93a9b5..25f479d28 100644
--- a/src/views/qms/selectedSet/index.vue
+++ b/src/views/qms/selectedSet/index.vue
@@ -1,22 +1,27 @@
-
+
-
-
+
+
-
@@ -60,24 +68,24 @@
/>
-
@@ -94,16 +102,16 @@