瀏覽代碼

病理人员增加体检tab

cyy 1 年之前
父節點
當前提交
7a79b8e363

+ 21 - 21
src/views/component/personnelFile/components/gzjlTag.vue

@@ -261,27 +261,27 @@ export default {
     },
     },
     data () {
     data () {
         const checkTimeJS = (rule, value, callback) => {
         const checkTimeJS = (rule, value, callback) => {
-            if (value) {
-                setTimeout(() => {
-                    const now = this.$common.getDateNow()
-                    const nowTime = new Date(now).getTime()
-                    const valueTime = new Date(value).getTime()
-                    const obj = this.nowData.find(t => t.liZhiShiJian === value)
-                    const ksTime = obj && obj.ruZhiShiJian !== null ? new Date(obj.ruZhiShiJian).getTime() : ''
-
-                    if (ksTime === '') {
-                        callback(new Error('请先选择开始时间'))
-                    } else if (nowTime < valueTime) {
-                        callback(new Error('请选择小于当前日期的时间'))
-                    } else if (ksTime >= valueTime) {
-                        callback(new Error('请选择大于开始日期的时间'))
-                    } else {
-                        callback()
-                    }
-                }, 100)
-            } else {
-                return callback(new Error('请选择时间'))
-            }
+            // if (value) {
+            setTimeout(() => {
+                const now = this.$common.getDateNow()
+                const nowTime = new Date(now).getTime()
+                const valueTime = new Date(value).getTime()
+                const obj = this.nowData.find(t => t.liZhiShiJian === value)
+                const ksTime = obj && obj.ruZhiShiJian !== null ? new Date(obj.ruZhiShiJian).getTime() : ''
+                console.log(value)
+                if (value !== null && ksTime === '') {
+                    callback(new Error('请先选择开始时间'))
+                } else if (value !== null && nowTime < valueTime) {
+                    callback(new Error('请选择小于当前日期的时间'))
+                } else if (value !== null && ksTime >= valueTime) {
+                    callback(new Error('请选择大于开始日期的时间'))
+                } else {
+                    callback()
+                }
+            }, 100)
+            // } else {
+            //     return callback(new Error('请选择时间'))
+            // }
         }
         }
         return {
         return {
             activeName: 'first',
             activeName: 'first',

+ 7 - 1
src/views/component/personnelFile/components/modulesTag.vue

@@ -98,6 +98,9 @@
             <el-tab-pane v-if="judgeTag('kaoshijilu')" label="考试记录" name="kaoshijilu" class="tabPane">
             <el-tab-pane v-if="judgeTag('kaoshijilu')" label="考试记录" name="kaoshijilu" class="tabPane">
                 <public-list ref="kaoshijilu" class="paneAll" :plane-data="judgeDataAll('kaoshijilu')" :tab-name="'kaoshijilu'" :button-type="buttonType" :btn-show="btnShow" :btn-type="btnType" @changeButtonShow="changeButtonShow" @changeBaseData="changeBaseData" />
                 <public-list ref="kaoshijilu" class="paneAll" :plane-data="judgeDataAll('kaoshijilu')" :tab-name="'kaoshijilu'" :button-type="buttonType" :btn-show="btnShow" :btn-type="btnType" @changeButtonShow="changeButtonShow" @changeBaseData="changeBaseData" />
             </el-tab-pane>
             </el-tab-pane>
+            <el-tab-pane v-if="judgeTag('tjbgb')" label="体检报告" name="tjbgb" class="tabPane">
+                <public-list ref="tjbgb" class="paneAll" :plane-data="judgeDataAll('tjbgb')" :tab-name="'tjbgb'" :button-type="buttonType" :btn-show="btnShow" :btn-type="btnType" @changeButtonShow="changeButtonShow" @changeBaseData="changeBaseData" />
+            </el-tab-pane>
         </el-tabs>
         </el-tabs>
     </div>
     </div>
 </template>
 </template>
@@ -236,12 +239,15 @@ export default {
                 case 'kaoshijilu':
                 case 'kaoshijilu':
                     this.handleClickRY({ name: 'kaoshijilu' })
                     this.handleClickRY({ name: 'kaoshijilu' })
                     break
                     break
+                case 'tjbgb':
+                    this.handleClickRY({ name: 'tjbgb' })
+                    break
                 default:
                 default:
                     break
                     break
             }
             }
         },
         },
         handleClickRY (val) {
         handleClickRY (val) {
-            const arr = ['jyrykhjlb', 'lhrynlqr', 'lhrypxjlb', 'lhpxsqb', 'kaoshijilu']
+            const arr = ['jyrykhjlb', 'lhrynlqr', 'lhrypxjlb', 'lhpxsqb', 'kaoshijilu', 'tjbgb']
             arr.forEach(item => {
             arr.forEach(item => {
                 if (typeof this.$refs[item] !== 'undefined' && typeof this.$refs[item].$refs['reviewTable' + item] !== 'undefined') {
                 if (typeof this.$refs[item] !== 'undefined' && typeof this.$refs[item].$refs['reviewTable' + item] !== 'undefined') {
                     setTimeout(() => {
                     setTimeout(() => {

+ 16 - 1
src/views/component/personnelFile/constants/simulated.js

@@ -426,7 +426,8 @@ export function correlationSql (type, val) {
         lhrynlqr: 'bei_shou_quan_ren',
         lhrynlqr: 'bei_shou_quan_ren',
         lhrypxjlb: 'peixunrenyuan',
         lhrypxjlb: 'peixunrenyuan',
         lhpxsqb: 'can_jia_ren_yuan_',
         lhpxsqb: 'can_jia_ren_yuan_',
-        kaoshijilu: 'examinee'
+        kaoshijilu: 'examinee',
+        tjbgb: 'xing_ming_'
     }
     }
     if (type === 'jyrykhjlb' || type === 'lhrynlqr' || type === 'lhpxsqb') {
     if (type === 'jyrykhjlb' || type === 'lhrynlqr' || type === 'lhpxsqb') {
         sql = `select * from t_${type} where FIND_IN_SET('${val}',${col[type]}) and shi_fou_guo_shen_ = '已完成' `
         sql = `select * from t_${type} where FIND_IN_SET('${val}',${col[type]}) and shi_fou_guo_shen_ = '已完成' `
@@ -434,6 +435,8 @@ export function correlationSql (type, val) {
         sql = `select * from v_examination where FIND_IN_SET('${val}',${col[type]}) and paperState = '已完成' ORDER BY createTime asc`
         sql = `select * from v_examination where FIND_IN_SET('${val}',${col[type]}) and paperState = '已完成' ORDER BY createTime asc`
     } else if (type === 'lhrypxjlb') {
     } else if (type === 'lhrypxjlb') {
         sql = `select * from v_wodepeixun where FIND_IN_SET('${val}',${col[type]}) and shi_fou_guo_shen_ = '已结束' `
         sql = `select * from v_wodepeixun where FIND_IN_SET('${val}',${col[type]}) and shi_fou_guo_shen_ = '已结束' `
+    } else if (type === 'tjbgb') {
+        sql = `select * from t_${type} where FIND_IN_SET('${val}',${col[type]})`
     }
     }
     return sql
     return sql
 }
 }
@@ -542,6 +545,18 @@ export const correlationConfig = {
             [{ name: '最高得分', field: 'maxScore', type: 'text' }, { name: '最近得分', field: 'recentScore', type: 'text' }],
             [{ name: '最高得分', field: 'maxScore', type: 'text' }, { name: '最近得分', field: 'recentScore', type: 'text' }],
             [{ name: '平均得分', field: 'averageScore', type: 'text' }]
             [{ name: '平均得分', field: 'averageScore', type: 'text' }]
         ]
         ]
+    },
+    tjbgb: {
+        config: [
+            { label: '体检日期', width: '20%', type: 'text', field: 'ti_jian_shi_jian_' },
+            { label: '体检机构', width: '30%', type: 'text', field: 'ti_jian_ji_gou_' },
+            { label: '附件', width: '40%', type: 'file', field: 'fu_jian_' }
+
+        ],
+        dialog: [
+            [{ name: '体检日期', field: 'ti_jian_shi_jian_', type: 'text' }, { name: '体检机构', field: 'ti_jian_ji_gou_', type: 'text' }],
+            [{ name: '附件', field: 'fu_jian_', type: 'file' }]
+        ]
     }
     }
 }
 }
 export default {
 export default {