瀏覽代碼

Merge branch '深圳三院' of http://119.23.210.103:3000/wy/zdqy_firm_former into 深圳三院

cfort 10 月之前
父節點
當前提交
540cd5ad76

+ 2 - 1
src/utils/action.js

@@ -144,7 +144,8 @@ const action = {
             }
 
             // 20250603 删除数据提示信息增加删除数据的数量提示
-            const newConfirmMsg = confirmMsg.replace('该数据', `已选中的${selection.split(',')?.length}条数据`)
+            const isDefaultMsg = confirmMsg === I18n.t('common.dialog.removeRecord')
+            const newConfirmMsg = isArray || !isDefaultMsg ? confirmMsg : confirmMsg.replace('该数据', `已选中的${selection.split(',')?.length}条数据`)
             MessageBox.confirm(newConfirmMsg, I18n.t('common.dialog.title'), {
                 type: 'warning'
             }).then(() => {

+ 1 - 1
src/views/component/newReagent/newReagent.vue

@@ -439,7 +439,7 @@ export default {
 
                 // 计算差值/偏倚
                 if (jiSuanFangShi === '|Y-X|') {
-                    item.shiJiChaZhi = Math.abs(xinJieGuo - jiuJieGuo)
+                    item.shiJiChaZhi = Math.abs((xinJieGuo * 100000 - jiuJieGuo * 100000) / 100000)
                     item.xiangFu = normalizePercent(item.shiJiChaZhi) <= normalizePercent(zuiXiaoFanWei) ? '相符' : '不相符'
                     item.jieGuo = ''
                 } else {

+ 91 - 6
src/views/component/sop/xueQingXueShiYan.vue

@@ -1,14 +1,33 @@
 <template>
     <div class="performance">
+        <div class="flex">
+            <div class="title">*</div>
+            <div v-if="isRead" />
+            <div v-else>
+                <el-button type="primary" size="mini" icon="ibps-icon-add" @click="handleAdd"> 添加</el-button>
+                <el-button type="danger" size="mini" icon="ibps-icon-remove" @click="handleDelete"> 删除</el-button>
+            </div>
+        </div>
         <div class="table">
-            <el-table :data="tableData" border>
+            <el-table :data="tableData" border @selection-change="handleSelectionChange">
+                <el-table-column type="selection" width="55" />
                 <el-table-column
                     label="序号"
                     width="50"
                     type="index"
                 />
-                <el-table-column label="菌株编号" prop="junZhuBianHao" width="100" />
-                <el-table-column label="菌株名称" prop="junZhuMingCheng" width="120" />
+                <el-table-column label="菌株编号" prop="junZhuBianHao" width="100">
+                    <template slot-scope="{row}">
+                        <el-input v-if="!readonly && !shiFouGuoShen" v-model="row.junZhuBianHao" size="mini" placeholder="请输入" />
+                        <span v-else>{{ row.junZhuBianHao || '/' }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="菌株名称" prop="junZhuMingCheng" width="120">
+                    <template slot-scope="{row}">
+                        <el-input v-if="!readonly && !shiFouGuoShen" v-model="row.junZhuMingCheng" size="mini" placeholder="请输入" />
+                        <span v-else>{{ row.junZhuMingCheng || '/' }}</span>
+                    </template>
+                </el-table-column>
                 <el-table-column label="沙门菌属诊断血清">
                     <el-table-column label="O多价血清(A-F)" prop="duoJiaXieQing">
                         <template slot-scope="{row}">
@@ -107,11 +126,17 @@ export default {
         readonly: {
             type: Boolean,
             default: false
+        },
+        params: {
+            type: Object,
+            default: () => {}
         }
     },
     data () {
         return {
-            tableData: []
+            tableData: [],
+            multipleSelection: [],
+            isRead: false
         }
     },
     computed: {
@@ -146,15 +171,75 @@ export default {
             deep: true
         }
     },
+    mounted () {
+        this.isRead = this.readonly || this.params?.nodeId === 'Activity_14to8rh'
+    },
 
     methods: {
-
+        handleSelectionChange (val) {
+            this.multipleSelection = val
+        },
+        handleAdd () {
+            const { level } = this.$store.getters
+            this.tableData.push({
+                'id': '',
+                'parentId': '',
+                'diDian': level.second || level.first || '',
+                'bianZhiRen': this.formData.bianZhiRen,
+                'bianZhiBuMen': this.formData.bianZhiBuMen,
+                'bianZhiShiJian': this.formData.bianZhiShiJian,
+                'junZhuId': '',
+                'junZhuBianHao': '',
+                'junZhuMingCheng': '',
+                'duoJiaXieQing': '',
+                'yinZiXieQing': '',
+                'yinZiXieQing1Xian': '',
+                'yinZiXieQing2Xian': '',
+                'siZhongDuoJiaXieQ': '',
+                'liJiZhiHeJunDuoJi': '',
+                'fuShiZhiHeJunDuoJ': '',
+                'baoShiZhiHeJunDuo': '',
+                'songNeiShiZhiHeJu': '',
+                'xieQingXueJianDin': '',
+                'biDuiJieGuoPanDua': '通过',
+                'beiZhu': ''
+            })
+        },
+        // 删除
+        handleDelete () {
+            this.$confirm('确定删除当前选中数据?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                if (this.multipleSelection.length > 0) {
+                    this.tableData = this.tableData.filter(row => !this.multipleSelection.includes(row))
+                } else {
+                    this.$message.warning('请选择数据')
+                }
+            })
+        }
     }
 }
 </script>
 
-<style>
+<style lang="scss" scoped>
 .performance{
     padding: 20px 0 0 20px;
+    .flex{
+        display: flex;
+        justify-content: space-between;
+        padding: 0px 0px 0px 15px;
+        background: #f0ffff;
+        .title {
+            color: red;
+            font-size: 12px;
+            font-weight: bold;
+            margin-bottom: 0;
+        }
+        .el-button {
+            margin: 0;
+        }
+    }
 }
 </style>

+ 25 - 20
src/views/platform/risk/riskV2.vue

@@ -467,22 +467,6 @@ export default {
                     })
                     const submitNum = new Set(data.map(item => item.bian_zhi_ren_)).size
                     if (submitNum === pinGuRenNum && data.every(item => item.shi_fou_guo_shen_ === '已完成')) {
-                        // 0.生成快照
-                        const formName = '风险管理/风险识别评估表V2.rpx'
-                        const res = await this.$common.snapshoot({
-                            url: this.$getReportFile(formName, this.getReportParams(formName, this.params.id_, {
-                                ...this.preParams,
-                                shi_fou_guo_shen_: '已完成'
-                            })),
-                            name: this.params.id_,
-                            type: 'pdf'
-                        })
-                        console.log(res)
-                        if (!res.data || !res.data.id) {
-                            console.log('快照生成失败')
-                        } else {
-                            console.log('快照生成成功')
-                        }
                         // 1.修改状态为已完成 并保存快照
                         const updateParamsRecord = {
                             tableName: 't_fxpgjlb2',
@@ -491,8 +475,7 @@ export default {
                                     id_: this.params.id_
                                 },
                                 param: {
-                                    shi_fou_guo_shen_: '已完成',
-                                    kuai_zhao_: res.data.id
+                                    shi_fou_guo_shen_: '已完成'
                                 }
                             }]
                         }
@@ -534,13 +517,16 @@ export default {
                             formKey: 'fxcscsbV2',
                             defKey: 'Process_1li9h0n'
                         }
+                        this.loading = true
                         for (let i = 0; i < addParams.paramWhere.length; i++) {
                             const item = addParams.paramWhere[i]
                             item.gai_jin_bian_hao_ = await this.getNextAlias('gjjllsh')
                         }
-                        console.log(addParams)
                         if (addParams.paramWhere.length) {
-                            await this.$common.request('add', addParams)
+                            // 预防推送流程数据过多,做切片处理
+                            await this.processInBatches(addParams.paramWhere).then(() => {}).catch(() => {
+                                this.loading = false
+                            })
                             console.log('改进流程推送成功')
                         } else {
                             console.log('无需推送')
@@ -591,6 +577,25 @@ export default {
                 this.$message.warning(error.message)
             }
         },
+        async processInBatches (array, batchSize = 20) {
+            for (let i = 0; i < array.length; i += batchSize) {
+                const batch = array.slice(i, i + batchSize)
+
+                try {
+                    const addParams = {
+                        'tableName': 't_fxkzcsb2',
+                        'paramWhere': batch,
+                        'formKey': 'fxcscsbV2',
+                        'defKey': 'Process_1li9h0n'
+                    }
+                    await this.$common.request('add', addParams)
+                } catch (error) {
+                    console.error('处理批次时出错:', error)
+                    // 可以添加重试逻辑或错误处理
+                }
+            }
+            console.log('所有数据处理完成')
+        },
         // id 转 姓名
         switchIdtoUserName (id) {
             const { userList } = this.$store.getters