123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- var template = ''
- function isStrEmpty(str) {
- if (str instanceof Array) {
- return str.length === 0
- }
- return typeof str === 'undefined' || str === null || str === ''
- }
- $.ajax('../../../component/statistics/LascBreastCduInspectEntityList/index.html', {
- data: {},
- dataType: 'html',
- cache: false,
- timeout: 60000,
- async: false,
- error: function (res) {},
- success: function (res) {
- template = res
- }
- })
- Vue.component('lasc-breast-cduInspect-entity-list', {
- template: template,
- props: ['data'],
- data: function () {
- return {
- readonly: true,
- isShowPicker: false,
- columns: ['非对称性腺体增厚', '乳头凹陷', '腋窝淋巴结肿大', '副乳腺', '乳腺切除术后'],
- pickType: '',
- curItem: '',
- isShowDatePicker: false,
- activeDateField: '',
- date: '',
- form: {
- screenId: '', //两癌筛查id
- receiveBreastUltrasoundInspect: '2', //是否接收乳腺临床检查1拒绝2接收
- list: []
- },
- active: '',
- cytoTubeNum: ''
- }
- },
- methods: {},
- watch: {
- data: {
- handler(newVal, oldVal) {
-
- if (this.data.value && this.data.value.length) {
- var first = this.data.value[0]
- this.form.screenId = first.screenId
- this.form.receiveBreastUltrasoundInspect = first.receiveBreastUltrasoundInspect
- var formData = JSON.parse(JSON.stringify(this.data.value))
- formData.forEach(function (v) {
- var left = { boxShow: false, name: '左乳' },
- right = { boxShow: false, name: '右乳' }
- for (var k in v) {
- if (k.indexOf('right') === 0) {
- right[k] = v[k]
- if (k == 'rightCduSolidMassMaxSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- right['minSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- right['middleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- right['maxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- right['minSize'] = ''
- right['middleSize'] = ''
- right['maxSize'] = ''
- }
- }
- if (k == 'rightCystSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- right['rightCystMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- right['rightCystMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- right['rightCystMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- right['rightCystMinSize'] = ''
- right['rightCystMiddleSize'] = ''
- right['rightCystMaxSize'] = ''
- }
- }
- if (k == 'rightCduIrregularHypoechoicSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- right['rightCduIrregularMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- right['rightCduIrregularMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- right['rightCduIrregularMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- right['rightCduIrregularMinSize'] = ''
- right['rightCduIrregularMiddleSize'] = ''
- right['rightCduIrregularMaxSize'] = ''
- }
- }
- if (k == 'rightCduIrregularHypoechoicPosition') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduSolidMassBloodDistribution') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduCystType') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduCyst') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduOtherAbnormal') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightDuctDilationLocation') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- } else if (k.indexOf('left') === 0) {
- left['right' + k.substring(4)] = v[k]
- if (k == 'leftCduSolidMassMaxSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- left['minSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- left['middleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- left['maxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- left['minSize'] = ''
- left['middleSize'] = ''
- left['maxSize'] = ''
- }
- }
- if (k == 'leftCystSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- left['rightCystMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- left['rightCystMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- left['rightCystMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- left['rightCystMinSize'] = ''
- left['rightCystMiddleSize'] = ''
- left['rightCystMaxSize'] = ''
- }
- }
- if (k == 'leftCduIrregularHypoechoicSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- left['rightCduIrregularMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- left['rightCduIrregularMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- left['rightCduIrregularMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- left['rightCduIrregularMinSize'] = ''
- left['rightCduIrregularMiddleSize'] = ''
- left['rightCduIrregularMaxSize'] = ''
- }
- }
- if (k == 'leftCduIrregularHypoechoicPosition') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduSolidMassBloodDistribution') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduOtherAbnormal') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduCystType') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduCyst') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftDuctDilationLocation') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- // if(k=="leftCduSolidMassMaxSize") {
- // left["right"+ k.substring(4)] = left["right"+ k.substring(4)].split(',')
- // }
- }
- }
- v.breastList = [right, left]
- })
- this.form.list = formData
- this.cytoTubeNum = first.cytoTubeNum ? first.cytoTubeNum : ''
- console.log(this.form, 'lkkkkkkkkkkkkkkkkkkkkkkkkkkkk')
- }
- },
- deep: true
- }
- },
- mounted() {
-
- if (this.data.value && this.data.value.length) {
- var first = this.data.value[0]
- this.form.screenId = first.screenId
- this.form.receiveBreastUltrasoundInspect = first.receiveBreastUltrasoundInspect
- var formData = JSON.parse(JSON.stringify(this.data.value))
- formData.forEach(function (v) {
- var left = { boxShow: false, name: '左乳' },
- right = { boxShow: false, name: '右乳' }
- for (var k in v) {
- if (k.indexOf('right') === 0) {
- right[k] = v[k]
- if (k == 'rightCduSolidMassMaxSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- right['minSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- right['middleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- right['maxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- right['minSize'] = ''
- right['middleSize'] = ''
- right['maxSize'] = ''
- }
- }
- if (k == 'rightCystSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- right['rightCystMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- right['rightCystMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- right['rightCystMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- right['rightCystMinSize'] = ''
- right['rightCystMiddleSize'] = ''
- right['rightCystMaxSize'] = ''
- }
- }
- if (k == 'rightCduIrregularHypoechoicSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- right['rightCduIrregularMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- right['rightCduIrregularMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- right['rightCduIrregularMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- right['rightCduIrregularMinSize'] = ''
- right['rightCduIrregularMiddleSize'] = ''
- right['rightCduIrregularMaxSize'] = ''
- }
- }
- if (k == 'rightCduIrregularHypoechoicPosition') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduSolidMassBloodDistribution') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduCystType') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduCyst') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightCduOtherAbnormal') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- if (k == 'rightDuctDilationLocation') {
- right[k] = right[k] ? right[k].split(',') : []
- }
- } else if (k.indexOf('left') === 0) {
- left['right' + k.substring(4)] = v[k]
- if (k == 'leftCduSolidMassMaxSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- left['minSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- left['middleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- left['maxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- left['minSize'] = ''
- left['middleSize'] = ''
- left['maxSize'] = ''
- }
- }
- if (k == 'leftCystSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- left['rightCystMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- left['rightCystMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- left['rightCystMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- left['rightCystMinSize'] = ''
- left['rightCystMiddleSize'] = ''
- left['rightCystMaxSize'] = ''
- }
- }
- if (k == 'leftCduIrregularHypoechoicSize') {
- if (!isStrEmpty(v[k])) {
- var m = v[k].split('*')
- left['rightCduIrregularMinSize'] = isStrEmpty(m[0]) ? '' : Number(m[0])
- left['rightCduIrregularMiddleSize'] = isStrEmpty(m[1]) ? '' : Number(m[1])
- left['rightCduIrregularMaxSize'] = isStrEmpty(m[2]) ? '' : Number(m[2])
- } else {
- left['rightCduIrregularMinSize'] = ''
- left['rightCduIrregularMiddleSize'] = ''
- left['rightCduIrregularMaxSize'] = ''
- }
- }
- if (k == 'leftCduIrregularHypoechoicPosition') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduSolidMassBloodDistribution') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduOtherAbnormal') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduCystType') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftCduCyst') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- if (k == 'leftDuctDilationLocation') {
- left['right' + k.substring(4)] = left['right' + k.substring(4)] ? left['right' + k.substring(4)].split(',') : []
- }
- // if(k=="leftCduSolidMassMaxSize") {
- // left["right"+ k.substring(4)] = left["right"+ k.substring(4)].split(',')
- // }
- }
- }
- v.breastList = [right, left]
- })
- this.form.list = formData
- this.cytoTubeNum = first.cytoTubeNum ? first.cytoTubeNum : ''
- console.log(this.form, 'lkkkkkkkkkkkkkkkkkkkkkkkkkkkk')
- }
- console.log('1111111111111111111',this)
- }
- })
|