|
@@ -8,69 +8,56 @@
|
|
</view>
|
|
</view>
|
|
<view class="upload-home">
|
|
<view class="upload-home">
|
|
<view v-for="(item,index) in verification" :key="index">
|
|
<view v-for="(item,index) in verification" :key="index">
|
|
- <view class="imgList" v-if="item.name=='附件'">
|
|
|
|
|
|
+ <view class="imgList" v-if="item.key=='resource_ids'">
|
|
<view class="img-title">请上传pdf文件</view>
|
|
<view class="img-title">请上传pdf文件</view>
|
|
<view class="img-box">
|
|
<view class="img-box">
|
|
<view class="htz-image-upload-Item" v-if="pdfUrl!=''" v-for="(item,index) in pdfUrl" :key="index">
|
|
<view class="htz-image-upload-Item" v-if="pdfUrl!=''" v-for="(item,index) in pdfUrl" :key="index">
|
|
<image class="img" src="/static/images/pdf.png" @click="imgPreview(index)"></image>
|
|
<image class="img" src="/static/images/pdf.png" @click="imgPreview(index)"></image>
|
|
<view class="htz-image-upload-Item-del" @click="imgDel(index)">×</view>
|
|
<view class="htz-image-upload-Item-del" @click="imgDel(index)">×</view>
|
|
</view>
|
|
</view>
|
|
- <view class="htz-image-upload-Item htz-image-upload-Item-add" @click="upload">
|
|
|
|
|
|
+ <view class="htz-image-upload-Item htz-image-upload-Item-add" @click="upload" v-if="pdfUrl.length < number">
|
|
+
|
|
+
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="table" v-if="item.name=='分值'">
|
|
|
|
- <view class="text-box">
|
|
|
|
- <text class="input-key">分值:</text><input type="text" v-model="item.fenshu" class="input-val" placeholder-style="color:darkgray;"
|
|
|
|
- placeholder="请输入分值" />
|
|
|
|
|
|
+ <view class="imgList" v-if="item.key=='prove_files'">
|
|
|
|
+ <view class="img-title">{{item.name}}</view>
|
|
|
|
+ <view class="img-box">
|
|
|
|
+ <view class="htz-image-upload-Item" v-if="cailiao_pdfUrl!=''" v-for="(item,index) in cailiao_pdfUrl" :key="index">
|
|
|
|
+ <image class="img" src="/static/images/pdf.png" @click="imgPreview(index)"></image>
|
|
|
|
+ <view class="htz-image-upload-Item-del" @click="imgDel_cailiao(index)">×</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="htz-image-upload-Item htz-image-upload-Item-add" @click="upload_cailiao" v-if="pdfUrl.length < 9">
|
|
|
|
+ +
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="table" v-if="item.name=='奖项名称'">
|
|
|
|
|
|
+ <view class="table" v-if="item.key!='resource_ids' && item.key!='prove_files'">
|
|
<view class="text-box">
|
|
<view class="text-box">
|
|
<text class="input-key">{{item.name}}:</text><input type="text" v-model="item.fenshu" class="input-val" placeholder-style="color:darkgray;"
|
|
<text class="input-key">{{item.name}}:</text><input type="text" v-model="item.fenshu" class="input-val" placeholder-style="color:darkgray;"
|
|
:placeholder="'请输入'+item.name" />
|
|
:placeholder="'请输入'+item.name" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="table" v-if="item.name=='奖项等级'">
|
|
|
|
|
|
+ <view class="table" v-if="item.key=='grade_id'">
|
|
<view class="text-box" style="display: flex;align-items: center;justify-content: space-between;">
|
|
<view class="text-box" style="display: flex;align-items: center;justify-content: space-between;">
|
|
- <text class="input-key">奖项等级:</text>
|
|
|
|
|
|
+ <text class="input-key">{{item.name}}:</text>
|
|
<picker mode="selector" :range="extra.position_grade" @change="gradeChange"
|
|
<picker mode="selector" :range="extra.position_grade" @change="gradeChange"
|
|
class="input1" :value="position_grade">
|
|
class="input1" :value="position_grade">
|
|
<view class="uni-input" style="font-size: 33upx;color: darkgray;">{{grade}}</view>
|
|
<view class="uni-input" style="font-size: 33upx;color: darkgray;">{{grade}}</view>
|
|
</picker>
|
|
</picker>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="table" v-if="item.name=='获奖名次'">
|
|
|
|
- <view class="text-box">
|
|
|
|
- <text class="input-key">{{item.name}}:</text><input type="text" v-model="item.fenshu" class="input-val" placeholder-style="color:darkgray;"
|
|
|
|
- :placeholder="'请输入'+item.name" />
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="table" v-if="item.name=='颁发单位'">
|
|
|
|
- <view class="text-box">
|
|
|
|
- <text class="input-key">{{item.name}}:</text><input type="text" v-model="item.fenshu" class="input-val" placeholder-style="color:darkgray;"
|
|
|
|
- :placeholder="'请输入'+item.name" />
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="table" v-if="item.name=='颁发日期'">
|
|
|
|
|
|
+ <view class="table" v-if="item.key=='award_day'">
|
|
<view class="text-box" style="display: flex;align-items: center;justify-content: space-between;">
|
|
<view class="text-box" style="display: flex;align-items: center;justify-content: space-between;">
|
|
- <text class="input-key">颁发日期:</text>
|
|
|
|
|
|
+ <text class="input-key">{{item.name}}:</text>
|
|
<picker mode="date" :value="time" @change="birthDateChange" class="input1">
|
|
<picker mode="date" :value="time" @change="birthDateChange" class="input1">
|
|
<view class="uni-input" style="font-size: 33upx;color: darkgray;">{{time}}</view>
|
|
<view class="uni-input" style="font-size: 33upx;color: darkgray;">{{time}}</view>
|
|
</picker>
|
|
</picker>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="table" v-if="item.name=='职位名称'">
|
|
|
|
- <view class="text-box">
|
|
|
|
- <text class="input-key">{{item.name}}:</text><input type="text" v-model="item.fenshu" class="input-val" placeholder-style="color:darkgray;"
|
|
|
|
- :placeholder="'请输入'+item.name" />
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="table" v-if="item.name=='职位等级'">
|
|
|
|
|
|
+ <view class="table" v-if="item.key=='position_grade'">
|
|
<view class="text-box" style="display: flex;align-items: center;justify-content: space-between;">
|
|
<view class="text-box" style="display: flex;align-items: center;justify-content: space-between;">
|
|
- <text class="input-key">奖项等级:</text>
|
|
|
|
|
|
+ <text class="input-key">{{item.name}}:</text>
|
|
<picker mode="selector" :range="extra.position_grade" @change="gradeChange"
|
|
<picker mode="selector" :range="extra.position_grade" @change="gradeChange"
|
|
class="input1" :value="position_grade">
|
|
class="input1" :value="position_grade">
|
|
<view class="uni-input" style="font-size: 33upx;color: darkgray;">{{grade}}</view>
|
|
<view class="uni-input" style="font-size: 33upx;color: darkgray;">{{grade}}</view>
|
|
@@ -110,8 +97,9 @@
|
|
extra:[],
|
|
extra:[],
|
|
grade:'请选择',
|
|
grade:'请选择',
|
|
position_grade:0,
|
|
position_grade:0,
|
|
- gradeValue:''
|
|
|
|
-
|
|
|
|
|
|
+ gradeValue:'',
|
|
|
|
+ cailiao_ids:[],
|
|
|
|
+ cailiao_pdfUrl:[]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
@@ -158,6 +146,44 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ upload_cailiao() {
|
|
|
|
+ var that = this
|
|
|
|
+ console.log(this.number)
|
|
|
|
+ uni.chooseFile({
|
|
|
|
+ count: this.number,
|
|
|
|
+ extension: ['.pdf'],
|
|
|
|
+ success(res) {
|
|
|
|
+ console.log(res)
|
|
|
|
+ that.cailiao_pdfUrl= that.cailiao_pdfUrl.concat(res.tempFilePaths)
|
|
|
|
+ that.cailiao_uploadFiles(res.tempFilePaths[0])
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ imgDel_cailiao(index){
|
|
|
|
+ var list = this.cailiao_pdfUrl
|
|
|
|
+ var id = this.cailiao_ids
|
|
|
|
+ list.splice(index,1)
|
|
|
|
+ id.splice(index,1)
|
|
|
|
+ this.cailiao_pdfUrl = list
|
|
|
|
+ this.cailiao_ids = id
|
|
|
|
+ },
|
|
|
|
+ cailiao_uploadFiles(url) {
|
|
|
|
+ uni.uploadFile({
|
|
|
|
+ url: this.baseUrl, //仅为示例,非真实的接口地址
|
|
|
|
+ filePath: url,
|
|
|
|
+ fileType: 'file',
|
|
|
|
+ formData: {
|
|
|
|
+ file_type: 'file'
|
|
|
|
+ },
|
|
|
|
+ header: this.headers,
|
|
|
|
+ success: (uploadFileRes) => {
|
|
|
|
+ console.log(uploadFileRes)
|
|
|
|
+ var data = JSON.parse(uploadFileRes.data)
|
|
|
|
+ console.log(data)
|
|
|
|
+ this.cailiao_ids = this.cailiao_ids.concat(data.data.url)
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ },
|
|
uploadFiles(url) {
|
|
uploadFiles(url) {
|
|
uni.uploadFile({
|
|
uni.uploadFile({
|
|
url: this.baseUrl, //仅为示例,非真实的接口地址
|
|
url: this.baseUrl, //仅为示例,非真实的接口地址
|
|
@@ -171,21 +197,7 @@
|
|
console.log(uploadFileRes)
|
|
console.log(uploadFileRes)
|
|
var data = JSON.parse(uploadFileRes.data)
|
|
var data = JSON.parse(uploadFileRes.data)
|
|
console.log(data)
|
|
console.log(data)
|
|
- this.uploadPdf = this.uploadPdf.concat(data.data.url)
|
|
|
|
- this.ids = this.ids.concat(data.data.id)
|
|
|
|
- console.log('first-------------------')
|
|
|
|
- // uni.hideLoading();
|
|
|
|
- //console.log(typeof this.uploadSuccess)
|
|
|
|
- //console.log('')
|
|
|
|
- // if (typeof this.uploadSuccess == 'function') {
|
|
|
|
- // if (this.uploadSuccess(uploadFileRes).success) {
|
|
|
|
- // this.value.push(this.uploadSuccess(uploadFileRes).url)
|
|
|
|
- // this.$emit("input", this.uploadLists);
|
|
|
|
- // }
|
|
|
|
- // console.log('成功')
|
|
|
|
- // }
|
|
|
|
- // resolve(uploadFileRes);
|
|
|
|
- // this.$emit("uploadSuccess", uploadFileRes);
|
|
|
|
|
|
+ this.ids = this.ids.concat(data.data.url)
|
|
},
|
|
},
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -213,6 +225,9 @@
|
|
if(this.verification[i].key == 'resource_ids'){
|
|
if(this.verification[i].key == 'resource_ids'){
|
|
obj.resource_ids = this.ids
|
|
obj.resource_ids = this.ids
|
|
}
|
|
}
|
|
|
|
+ if(this.verification[i].key == 'prove_files'){
|
|
|
|
+ obj.prove_files = this.cailiao_ids
|
|
|
|
+ }
|
|
if(this.verification[i].key == 'award_day'){
|
|
if(this.verification[i].key == 'award_day'){
|
|
obj.award_day = this.time
|
|
obj.award_day = this.time
|
|
}
|
|
}
|
|
@@ -226,6 +241,15 @@
|
|
obj.staff_id = this.staff_id
|
|
obj.staff_id = this.staff_id
|
|
obj.examine_question_id = this.typeId
|
|
obj.examine_question_id = this.typeId
|
|
console.log(obj)
|
|
console.log(obj)
|
|
|
|
+ for(var key in obj){
|
|
|
|
+ if(!obj[key]){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:'请完善信息表!',
|
|
|
|
+ icon:'none'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
app.request('/examine/store', obj, 'post').then(res => {
|
|
app.request('/examine/store', obj, 'post').then(res => {
|
|
console.log(res, "上传成功")
|
|
console.log(res, "上传成功")
|
|
if(res.statusCode==200){
|
|
if(res.statusCode==200){
|