Przeglądaj źródła

pcr工作日志组件支持选择往期

luoaoxuan 1 rok temu
rodzic
commit
466c2b3d07
1 zmienionych plików z 18 dodań i 1 usunięć
  1. 18 1
      src/views/component/sop/pcr.vue

+ 18 - 1
src/views/component/sop/pcr.vue

@@ -30,7 +30,7 @@
                             </template>
                             <template v-if="col.type==='input'">
                                 <span class="col-item">
-                                    <el-input v-if="!readonly" v-model="col.value" size="mini" style="width:120px" />
+                                    <el-input v-if="!readonly" v-model="col.value" size="mini" style="width:186px" />
                                     <template v-else>{{ col.value }}</template>
                                 </span>
                             </template>
@@ -90,6 +90,23 @@ export default {
                 }
             }
         },
+        'formData.xuanZeWangQi': {
+            async handler (val) {
+                if (val) {
+                    const sql = `select * from t_PCRjygzrzxqb where parent_id_='${val}' order by pei_zhi_id_`
+                    const { variables: { data = [] } = {}} = await this.$common.request('sql', sql)
+                    // console.log('data', data)
+                    const arr = data.map(item => ({
+                        quYuMing: item.qu_yu_ming_,
+                        lieBiaoShuJu: JSON.parse(item.lie_biao_shu_ju_),
+                        peiZhiId: item.pei_zhi_id_,
+                        bianZhiRen: item.bian_zhi_ren_,
+                        lieBiaoWenBen: item.lie_biao_wen_ben_
+                    }))
+                    this.tableList = arr
+                }
+            }
+        },
         tableList: {
             async handler (val) {
                 // console.log('tableList', val)