|
@@ -46,9 +46,9 @@
|
|
|
</u-form>
|
|
|
</scroll-view>
|
|
|
<u-select :list="siteSelectList" v-model="siteSelectShow" value-name="stationCode" label-name="stationName" @confirm="siteSelectCallback"> </u-select>
|
|
|
- <u-select :list="levelSelectList" v-model="levelSelectShow" @confirm="levelSelectCallback"> </u-select>
|
|
|
+ <u-select :list="levelSelectList" v-model="levelSelectShow" value-name="dictValue" label-name="dictLabel" @confirm="levelSelectCallback"> </u-select>
|
|
|
<u-select :list="personSelectList" v-model="showPerson" value-name="userId" label-name="nickName" @confirm="personSelectCallback"> </u-select>
|
|
|
- <u-select :list="nameSelectList" v-model="nameSelectShow" @confirm="nameSelectCallback"> </u-select>
|
|
|
+ <u-select :list="nameSelectList" v-model="nameSelectShow" value-name="remark" label-name="dictLabel" @confirm="nameSelectCallback"> </u-select>
|
|
|
<u-picker v-model="show" mode="time" :params="params" end-year="2050" :defaultTime="defaultTime" @confirm="timeHandle"></u-picker>
|
|
|
<u-button type="primary" class="commit-button" @click="submiHandle" :disabled="isClick">上 报</u-button>
|
|
|
</view>
|
|
@@ -76,6 +76,7 @@
|
|
|
attachment: '',
|
|
|
video: null,
|
|
|
img: [],
|
|
|
+ device: null,
|
|
|
},
|
|
|
//时间picker 默认值
|
|
|
params: {
|
|
@@ -160,7 +161,7 @@
|
|
|
//是否显示等级弹窗
|
|
|
levelSelectShow: false,
|
|
|
//等级列表
|
|
|
- levelSelectList: [{label: '一级', value: 1},{label: '二级', value: 2},{label: '三级', value: 3}],
|
|
|
+ levelSelectList: [],
|
|
|
//是否显示人员选择
|
|
|
showPerson: false,
|
|
|
//人员列表
|
|
@@ -171,19 +172,7 @@
|
|
|
//是否显示设备名称弹窗
|
|
|
nameSelectShow: false,
|
|
|
//设备名称列表
|
|
|
- nameSelectList: [
|
|
|
- {label: '机器人', value: 1},
|
|
|
- {label: '1号充电机', value: 2},
|
|
|
- {label: '2号充电机', value: 3},
|
|
|
- {label: '3号充电机', value: 4},
|
|
|
- {label: '4号充电机', value: 5},
|
|
|
- {label: '5号充电机', value: 6},
|
|
|
- {label: '6号充电机', value: 7},
|
|
|
- {label: '7号充电机', value: 8},
|
|
|
- {label: '8号充电机', value: 9},
|
|
|
- {label: '电池', value: 10},
|
|
|
- {label: '摄像头', value: 11},
|
|
|
- ]
|
|
|
+ nameSelectList: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -210,6 +199,8 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getSites();
|
|
|
+ this.getDictTypeData();
|
|
|
+ this.getlevelListData();
|
|
|
},
|
|
|
methods: {
|
|
|
//获取站点列表
|
|
@@ -241,6 +232,7 @@
|
|
|
nameSelectCallback(e) {
|
|
|
uni.hideKeyboard();
|
|
|
this.form.deviceName = e[0].label;
|
|
|
+ this.form.device = e[0].value;
|
|
|
},
|
|
|
//人员选择
|
|
|
personSelectCallback(e) {
|
|
@@ -261,6 +253,34 @@
|
|
|
}
|
|
|
this.showPerson = true;
|
|
|
},
|
|
|
+ //获取设备名称
|
|
|
+ getDictTypeData() {
|
|
|
+ let _that = this;
|
|
|
+ _that.nameSelectList = [];
|
|
|
+ _that.$http.getDictType('device_name').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if(res.code == 200) {
|
|
|
+ let list = res.data || [];
|
|
|
+ _that.nameSelectList = list;
|
|
|
+ } else {
|
|
|
+ _that.$utils.msg(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取工单级别
|
|
|
+ getlevelListData() {
|
|
|
+ let _that = this;
|
|
|
+ _that.levelSelectList = [];
|
|
|
+ _that.$http.getDictType('order_level').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if(res.code == 200) {
|
|
|
+ let list = res.data || [];
|
|
|
+ _that.levelSelectList = list;
|
|
|
+ } else {
|
|
|
+ _that.$utils.msg(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取站点下的人员列表
|
|
|
getPersons(code) {
|
|
|
let _that = this;
|
|
@@ -323,19 +343,21 @@
|
|
|
//图片上传
|
|
|
onChooseComplete(lists, name) {
|
|
|
const _that = this;
|
|
|
- uni.uploadFile({
|
|
|
- // 这里是你上传图片的地址
|
|
|
- url: 'https://tess.fast-fun.cn/zl/mini/file/upload',
|
|
|
- filePath: lists[0].url,
|
|
|
- name: 'file',
|
|
|
- header: {
|
|
|
- "Authorization": `${uni.getStorageSync("token")}`
|
|
|
- },
|
|
|
- // 这个res是后端返回给你上传成功的数据里边一般会有上传之后图片的在线路径
|
|
|
- success: (res) => {
|
|
|
- let data = JSON.parse(res.data)
|
|
|
- _that.form.img.push(data.msg)
|
|
|
- },
|
|
|
+ lists.forEach(item => {
|
|
|
+ uni.uploadFile({
|
|
|
+ // 这里是你上传图片的地址
|
|
|
+ url: 'https://tess.fast-fun.cn/zl/mini/file/upload',
|
|
|
+ filePath: item.url,
|
|
|
+ name: 'file',
|
|
|
+ header: {
|
|
|
+ "Authorization": `${uni.getStorageSync("token")}`
|
|
|
+ },
|
|
|
+ // 这个res是后端返回给你上传成功的数据里边一般会有上传之后图片的在线路径
|
|
|
+ success: (res) => {
|
|
|
+ let data = JSON.parse(res.data)
|
|
|
+ _that.form.img.push(data.msg)
|
|
|
+ },
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
//视频上传
|