Browse Source

QMS 问题

hella_online_20240829
wangyufei 4 months ago
parent
commit
970e6d703d
  1. 1
      package.json
  2. 4
      src/main.ts
  3. 6
      src/views/qms/inspectionJob/addForm.vue

1
package.json

@ -55,6 +55,7 @@
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-dompurify-html": "^4.1.4", "vue-dompurify-html": "^4.1.4",
"vue-i18n": "^9.4.1", "vue-i18n": "^9.4.1",
"vue-next-focus": "^0.0.12",
"vue-router": "^4.2.5", "vue-router": "^4.2.5",
"vue-types": "^5.1.1", "vue-types": "^5.1.1",
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0",

4
src/main.ts

@ -45,6 +45,9 @@ import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐
import DataVVue3 from '@kjgl77/datav-vue3' import DataVVue3 from '@kjgl77/datav-vue3'
import { useLocaleStore } from '@/store/modules/locale' import { useLocaleStore } from '@/store/modules/locale'
import { vue_next_focus } from "vue-next-focus";
// 创建实例 // 创建实例
const setupAll = async () => { const setupAll = async () => {
const app = createApp(App) const app = createApp(App)
@ -67,6 +70,7 @@ const setupAll = async () => {
app.use(VueDOMPurifyHTML) app.use(VueDOMPurifyHTML)
app.use(DataVVue3) app.use(DataVVue3)
app.use( vue_next_focus )
app.mount('#app') app.mount('#app')
app.config.warnHandler = () => null; app.config.warnHandler = () => null;

6
src/views/qms/inspectionJob/addForm.vue

@ -12,7 +12,7 @@
</div> </div>
<el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card" <el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card"
tab-position="left" :stretch="false"> tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name"> <el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name" v-next-focus>
<div class="small-title">检验工序</div> <div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef"> <el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20"> <el-row :gutter="20">
@ -415,7 +415,7 @@
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id) data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
list.forEach((item, index) => { list.forEach((item, index) => {
editableTabsValue.value = index + 1 // editableTabsValue.value = index + 1
item.name = index + 1 item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
@ -523,7 +523,7 @@
defineExpose({ open, dialogVisible, formLoading }) // open defineExpose({ open, dialogVisible, formLoading }) // open
import type { TabPaneName } from 'element-plus' import type { TabPaneName } from 'element-plus'
const editableTabsValue = ref('1') const editableTabsValue = ref(1)
// const editableTabs = ref([]) // const editableTabs = ref([])
const handleTabsEdit = (targetName : TabPaneName | undefined, action : 'remove' | 'add') => { const handleTabsEdit = (targetName : TabPaneName | undefined, action : 'remove' | 'add') => {
if (action === 'add') { if (action === 'add') {

Loading…
Cancel
Save