Commit bc984288 authored by sjf1256754123's avatar sjf1256754123

demo

parent 3ed39da6
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
</radio-group> </radio-group>
</view> </view>
</view> </view>
<template v-else-if="item.type == 'picker'"> <template v-else-if="item.type == 'picker'">
<view class="cu-form-group margin-top padding-rl" v-show="!item.hidden" :key="item.value"> <view class="cu-form-group margin-top padding-rl" v-show="!item.hidden" :key="item.value">
<view :class="item.titleClass"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx" v-if="item.required">*</span>{{index+1}}{{item.label}}</view> <view :class="item.titleClass"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx" v-if="item.required">*</span>{{index+1}}{{item.label}}</view>
...@@ -30,7 +29,6 @@ ...@@ -30,7 +29,6 @@
</picker> </picker>
</view> </view>
</template> </template>
<template v-else-if="item.type == 'date'"> <template v-else-if="item.type == 'date'">
<view class="cu-form-group margin-top padding-rl" v-show="!item.hidden" :key="item.value"> <view class="cu-form-group margin-top padding-rl" v-show="!item.hidden" :key="item.value">
<view :class="item.titleClass"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx" v-if="item.required">*</span>{{index+1}}{{item.label}}</view> <view :class="item.titleClass"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx" v-if="item.required">*</span>{{index+1}}{{item.label}}</view>
...@@ -41,33 +39,6 @@ ...@@ -41,33 +39,6 @@
</picker> </picker>
</view> </view>
</template> </template>
<!-- <view v-else-if="item.type == 'radio'" :key="index">
<view class="margin-top sict-label">
<uni-collapse>
<uni-collapse-item :title="index+1 +'、' + item.label" :open="true" :required="item.required">
<view class="padding-lr">
<view class="uni-list">
<checkbox-group>
<label class="uni-list-cell uni-list-cell-pd" v-for="(itemCheck,indexCheck) in item.opts" :key="itemCheck.value"
@click="radioChange2(indexCheck,item.opts,itemCheck.value)">
<view class="list-item">
<view class="fl">
<checkbox :value="itemCheck.value" :checked="itemCheck.checked" />
</view>
<view style="padding-left:60upx">{{itemCheck.label}}</view>
</view>
</label>
</checkbox-group>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view> -->
<template v-else-if="item.type == 'input'" > <template v-else-if="item.type == 'input'" >
<view class="cu-form-group margin-top padding-rl" :key="item.value"> <view class="cu-form-group margin-top padding-rl" :key="item.value">
<view :class="item.titleClass"> <view :class="item.titleClass">
...@@ -76,7 +47,6 @@ ...@@ -76,7 +47,6 @@
<input class="text-right" :placeholder="item.placeholder" :type="item.controType" :value="form[item.value]" name="input" @input="updateInputVal($event,item.value)"></input> <input class="text-right" :placeholder="item.placeholder" :type="item.controType" :value="form[item.value]" name="input" @input="updateInputVal($event,item.value)"></input>
</view> </view>
</template> </template>
<view class="margin-top-xs" v-show="item.child && childItem.show" v-for="(childItem,childIndex) in item.child" :key="childItem.value"> <view class="margin-top-xs" v-show="item.child && childItem.show" v-for="(childItem,childIndex) in item.child" :key="childItem.value">
<view class="margin-top-sm padding-rl sict-label cu-form-group"> <view class="margin-top-sm padding-rl sict-label cu-form-group">
<view> <view>
...@@ -90,18 +60,13 @@ ...@@ -90,18 +60,13 @@
{{form[childItem.value]>-1?childItem.opts[form[childItem.value]].label:'请选择'}} {{form[childItem.value]>-1?childItem.opts[form[childItem.value]].label:'请选择'}}
</view> </view>
</picker> </picker>
<input class="text-right" v-else-if="childItem.type == 'input'" :type="childItem.controType" :placeholder="childItem.placeholder" :value="form[childItem.value]" name="input" @input="updateInputVal($event,childItem.value)"></input> <input class="text-right" v-else-if="childItem.type == 'input'" :type="childItem.controType" :placeholder="childItem.placeholder" :value="form[childItem.value]" name="input" @input="updateInputVal($event,childItem.value)"></input>
</view> </view>
</view> </view>
</template> </template>
<view class="padding"> <view class="padding">
<button form-type="submit" class="cu-btn block bg-blue margin-tb-sm lg">提 交</button> <button form-type="submit" class="cu-btn block bg-blue margin-tb-sm lg">提 交</button>
</view> </view>
</form> </form>
</view> </view>
</template> </template>
...@@ -278,7 +243,6 @@ ...@@ -278,7 +243,6 @@
opts:[{value:'a',label:'已经确诊'},{value:'b',label:'疑似诊断'},{value:'b',label:'亲密接触者'},{value:'b',label:'正在接受集中医学观察'},{value:'b',label:'居家观察'},{value:'b',label:'已解除集中医学观察'},{value:'b',label:'无上述情况'}] opts:[{value:'a',label:'已经确诊'},{value:'b',label:'疑似诊断'},{value:'b',label:'亲密接触者'},{value:'b',label:'正在接受集中医学观察'},{value:'b',label:'居家观察'},{value:'b',label:'已解除集中医学观察'},{value:'b',label:'无上述情况'}]
} }
], ],
list:[ list:[
{ {
label:'单位名称', label:'单位名称',
...@@ -286,7 +250,7 @@ ...@@ -286,7 +250,7 @@
value:'orgId', value:'orgId',
titleClass:'title', titleClass:'title',
type:'picker', type:'picker',
opts:[{value:'a',label:'一位'},{value:'b',label:'多位'}] opts:[]
}, },
{ {
label:'所在部门', label:'所在部门',
...@@ -370,13 +334,14 @@ ...@@ -370,13 +334,14 @@
} }
], ],
form:{ form:{
orgId:'', orgId:-1,
department:'', department:'',
position:'', position:'',
name:'', name:'',
phone:'', phone:'',
nationality:'', nationality:-1,
idCard:'', idCard:'',
returnToWork:-1,
householdAddress:'', householdAddress:'',
residenceAddress:'', residenceAddress:'',
planReturnDate:'' planReturnDate:''
...@@ -404,7 +369,14 @@ ...@@ -404,7 +369,14 @@
this.$http.get(`/sict-ncov/org/page`, data).then(res => { this.$http.get(`/sict-ncov/org/page`, data).then(res => {
const d = res.data const d = res.data
if (d.code == 1) { if (d.code == 1) {
console.log(d) let list = []
d.object.list.forEach(item=>{
list.push({
label:item.orgName,
value:item.id
})
})
this.list[0].opts = list
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
...@@ -429,7 +401,8 @@ ...@@ -429,7 +401,8 @@
}, },
isShowChild(){ isShowChild(){
this.list[11].hidden = this.form['returnToWork'] == 'a' console.log(this.form['returnToWork'])
this.list[10].hidden = this.form['returnToWork'] == 'a'
}, },
Switch(e,prop){ Switch(e,prop){
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
.btnList{ .btnList{
padding-top: 435upx; padding-top: 435upx;
.btnStaff,.btnSecurity{ .btnStaff,.btnSecurity{
background-color: rgba(129,208,244,0.8); background-color: #92d0f1;
color: #FFFFFF; color: #FFFFFF;
border-radius: 60upx; border-radius: 60upx;
width: 52%; width: 52%;
......
<template> <template name="index">
<view> <view class="index">
测试 <view class="temp">
<view class="btnList">
<button class="btnNormal" type="primary" @click="normal">体温正常</button>
<button class="btnAbnormal" type="primary" @click="abnormal">体温异常</button>
</view>
<view v-show="abnormalFlag">
<view class="cu-form-group">
<view class="title">体温值:</view>
<input class="text-left" placeholder="请输入体温" type="number" :value="temperature" name="input" @input="updateInputVal($event,'temperature')"></input>
</view>
<view class="btnList" style="padding-top: 55upx;">
<button class="btnSubmit" type="primary" @click="submit">提交</button>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
components: {},
name: "home",
data() { data() {
return { return {
temperature:'',
} abnormalFlag:false
};
}, },
methods: { onLoad: function(option) {
},
onShow() {},
methods: {
// 体温正常
normal() {
uni.showToast({
icon: 'success',
title: "允许通行!"
})
},
// 体温异常
abnormal() {
this.abnormalFlag = true
},
// 更新输入框绑定的表单内容
updateInputVal(event, props) {
this.temperature = event.target.value
},
// 提交异常体温
submit(){
uni.showToast({
icon: 'none',
title: "提交异常体温!"
})
}
} }
} }
</script> </script>
<style> <style lang="scss" scoped>
.temp {
font-size: 40px;
text-align: center;
height: 100vh;
width: 100vw;
background-color: #24A1E3;
.btnList{
padding-top: 305upx;
.btnNormal,.btnAbnormal,.btnSubmit{
background-color: #92d0f1;
color: #FFFFFF;
border-radius: 60upx;
width: 52%;
text-align: center;
}
.btnAbnormal{
margin-top:95upx;
}
}
.cu-form-group{
margin-top:55upx;
padding: 1upx 150upx;
background-color: #24A1E3;
.title,.text-left{
font-size: 40upx;
color:#FFFFFF;
}
.text-left{
border-bottom: 2upx solid #FFFFFF;
}
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment