收集項目難點
常用點
1.關閉當前tag 並跳轉到新頁面
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.push('/research/topic/list')
2.對話框提示配置
this.$msgbox.confirm('確定要將這些人添加到課題嗎?', '提示', {
callback: (action) => {
if (action === 'confirm') {
this.$message.success('添加成功')
}
}
})
3.重置表單
this.$refs.sampleDataConfigAdd.resetForm()
4.訂閱模式
//父頁面
import rootvue from '@/config/eventroot.js'
rootvue.$off('research-topic-steps:data')
rootvue.$on('research-topic-steps:data', (res) => {
console.log(JSON.stringify(res))
this.stepConfig.active = res.active
if (res.hasOwnProperty('blNum')) {
this.blNum = res.blNum
}
})
//子頁面
import rootvue from '@/config/eventroot.js'
rootvue.$emit('research-topic-steps:data', {
active: 3
})
5.問題類型
item.split('_')[0]
6.avue date 時間控件
//顯示格式
{
format1: "yyyy-MM-dd hh:mm:ss",
format2: "yyyy-MM-dd",
valueFormat1: "yyyy-MM-dd hh:mm:ss",
valueFormat2: "timestamp",
}
//
- change 傳參
@change="((val)=>{userChooseAfterRestData(val, qItem, qIndex)})"
- 查找指定column對象:findObject
console.log(this.$refs.patientListNot.findObject(this.setDataNot.option.column, 'identityNumber'))