Browse Source

app2.0新生信息完善

娄底高职分支
ndbs 2 years ago
parent
commit
a6439036a9
1 changed files with 39 additions and 24 deletions
  1. +39
    -24
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue

+ 39
- 24
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/welcome/list.vue View File

@@ -16,18 +16,13 @@
<l-input title="户口类别" placeholder="请填写" :value="StuInfoFreshEntity.ResidenceNo" disabled right />
<l-input title="政治面貌" placeholder="请填写" :value="displayListItem(StuInfoFreshEntity, 'PartyFaceNo')" disabled right />
</view>
<!-- {{ StuInfoFreshEntity.GenderNo }} -->
<!-- <view class="welLine"></view> -->
<view class="welT" style="padding-top: 10px;">采集照片信息</view>
<view class="welBox">
<input type="hidden" id="Photo" value="" />
<input id="files" type="file" accept="image/*" />
<view class="welImgAdd">
<!--<view id="welImgBtn">上传照片</view>-->
<img id="PhotoImg" :src="imgSrc" alt="" />
</view>
<!--<view class="welText">说明:近期两寸免冠正面彩色照小于100K</view>-->
</view>
<l-upload
v-if="uploadVisiable"
ref="upload"
:number="1"
:value.sync="photo"
/>
<view class="welLine"></view>
<view class="welT" style="padding-top: 10px;">自然信息</view>
<view class="welLine"></view>
@@ -68,7 +63,9 @@
<view class="welDel" @click="del('StuInfoFreshEmergePeopleEntities', i)"><text class="text-xxl cuIcon cuIcon-move"></text></view>
</view>
</view>
<view class="btn" @click="tapBtn">保存</view>
<view class="welT" style="padding-top: 10px;">附件</view>
<uploadFile v-if="uploadVisiable" :number="10" :folderId="queryData.ID" :value="fileList"></uploadFile>
<view class="btn" @click="submit">保存</view>
</view>
</template>

@@ -76,9 +73,16 @@
import moment from 'moment';
import get from 'lodash/get';
import set from 'lodash/set';
import uploadFile from '@/components/upload-file.vue'
export default {
components:{
uploadFile,
},
data() {
return {
photo:[],
fileList:[],
uploadVisiable:false,
imgSrc: '',
scheme: {
PartyFaceNo: {
@@ -120,9 +124,7 @@ export default {
StuInfoFreshFamilyEntities:[],
StuInfoFreshEmergePeopleEntities: []
},
StuInfoFreshEntity:{
}
StuInfoFreshEntity:{}
};
},
methods: {
@@ -137,30 +139,36 @@ export default {
value: t.partyfaceno
}));
}),
() => {}
]);
_this.LOADING('加载数据…');
_this.HTTP_GET('StuInfoFresh/stuInfoFreshEntity', _this.userInfo.account, '加载数据时出错').then(res => {
this.HIDE_LOADING();
// console.log(res);
_this.StuInfoFreshEntity = _this.COPY(res.StuInfoFreshEntity);
_this.StuInfoFreshEntity = _this.COPY(res.StuInfoFreshEntity)||{};
_this.queryData.StuInfoFreshFamilyEntities = _this.COPY(res.StuInfoFreshFamilyList);
_this.queryData.StuInfoFreshEmergePeopleEntities = _this.COPY(res.StuInfoFreshEmergePeopleList);
_this.queryData.ID = res.StuInfoFreshEntity.ID;
_this.queryData.Photo = res.StuInfoFreshEntity.Photo;
_this.photo = res.StuInfoFreshEntity.Photo?[{url:res.StuInfoFreshEntity.Url,id:res.StuInfoFreshEntity.Photo}]:[];
_this.fileList = res.StuInfoFreshEntity.FilesList||[]
_this.refreshComponent()
_this.queryData.telephone = res.StuInfoFreshEntity.telephone;
_this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress;
_this.queryData.RegionNo = res.StuInfoFreshEntity.RegionNo;
_this.imgSrc = this.API.slice(0,-1) + res.Url;
// _this.imgSrc = this.API.slice(0,-1) + res.Url;
});
},
tapBtn() {
console.log(this.queryData)
async submit() {
this.LOADING('正在提交数据…');
this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData, '加载数据时出错').then(res => {
let res = await this.$refs["upload"].uploadImage()
if(res&&res.length){
this.queryData.Photo = res[0]["id"];
}else{
this.queryData.Photo = ""
}
this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData).then(res => {
this.HIDE_LOADING();
// console.log(res);
if (res) {
this.TOAST('保存成功');
}
@@ -174,7 +182,14 @@ export default {
del(str, num) {
this.queryData[str].splice(num, 1)
},

refreshComponent(){
// this.uploadVisiable = false
this.$nextTick(()=>{
this.uploadVisiable = true
})
},
// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field];


Loading…
Cancel
Save