单选搞定

This commit is contained in:
changjinpeng
2022-03-03 19:01:12 +08:00
parent 4fb6e1571c
commit af5a12b69a

View File

@@ -48,13 +48,15 @@
</div> </div>
<!-- 单选 4 --> <!-- 单选 4 -->
<div class="calendar" v-if="item.fieldType == 4"> <div class="calendar" v-if="item.fieldDataType == 4">
<div class="left"> <div class="left">
<span class="icon" v-if="item.mustFill == 1">*</span> <span class="icon" v-if="item.mustFill == 1">*</span>
<span> {{ item.fieldName }}:</span> <span> {{ item.fieldName }}:</span>
</div> </div>
<div class="left"> <div class="left">
<u-input type="text" @click="timeSelect(index)" class="right" placeholder="请选择" disabled v-model="item.fieldValue"></u-input> <u-input type="text" @click="showStstus = true" class="right" placeholder="请选择" disabled v-model="item.fieldValue"></u-input>
<u-select v-model="showStstus" :list="$dict.getDict(item.dictionaryCode)" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</div> </div>
</div> </div>
</div> </div>
@@ -110,12 +112,12 @@ export default {
filedIndex: 0, filedIndex: 0,
fileNameList: [], fileNameList: [],
opinion: '', opinion: '',
showStstus: false,
} }
}, },
onLoad(options) { onLoad(options) {
this.objid = options.id this.objid = options.id
this.type = options.type this.type = options.type
this.getList() this.getList()
}, },
onShow() { onShow() {
@@ -131,15 +133,13 @@ export default {
.post(`/app/approv-alapply-info/approval-popup?type=${this.type}&id=${this.objid}`) .post(`/app/approv-alapply-info/approval-popup?type=${this.type}&id=${this.objid}`)
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.list = res.data.fieldInfos
console.log(this.list)
res.data.fieldInfos.map((item) => { res.data.fieldInfos.map((item) => {
// this.list.push(item) if (item.fieldType != 3) {
// if (item.fieldDataType == 1) { item.fieldValue = ''
// item.fieldValue = '' }
// } if (item.fieldType == 3) {
// if (item.fieldType == 3) { this.list.push(item)
// } }
}) })
} }
}) })
@@ -162,6 +162,10 @@ export default {
}) })
}, },
selectStatus(e) {
this.$set(this.list[index], 'fieldValue', this.value)
},
btn() { btn() {
// if (this.type == 0 && this.opinion == '') { // if (this.type == 0 && this.opinion == '') {
// return uni.showToast({ // return uni.showToast({