需求提交

test
zhangdi 1 year ago
parent 9d6ba51fed
commit 8b6d3c8d02
  1. 11
      App.vue
  2. 20
      api/api.js
  3. 39
      common/betone_components/betone-new-input.vue
  4. 44
      common/betone_components/betone-upload.vue
  5. 106
      pages/register/index.vue
  6. 15
      pages/register/registerSuccess.vue
  7. 12
      pages/submission/components/subForm.vue
  8. 1
      pages/submission/index.vue
  9. 5
      pages/submission/recordsdetails.vue
  10. 104
      pages/submission/sendOrders.vue
  11. 22
      utils/request.js
  12. 2
      utils/tabbar.js
  13. 45
      utils/website.js

@ -2,11 +2,6 @@
export default { export default {
onLaunch: function (options) { onLaunch: function (options) {
uni.hideTabBar() uni.hideTabBar()
},
onReady() {
},
onShow: function () {
console.log("App Show"); console.log("App Show");
const value = uni.getStorageSync("token"); const value = uni.getStorageSync("token");
console.log("App Launch", !value); console.log("App Launch", !value);
@ -22,6 +17,12 @@ export default {
// //
this.$store.dispatch("changeTabbar", userInfo.role_id); this.$store.dispatch("changeTabbar", userInfo.role_id);
} }
},
onReady() {
},
onShow: function () {
}, },
onHide: function () { onHide: function () {

@ -9,7 +9,17 @@ const install = (Vue, vm) => {
let login = (params) => http.post('/blade-auth/oauth/token?' + params) let login = (params) => http.post('/blade-auth/oauth/token?' + params)
// 退出 // 退出
let logout = () => http.get('/blade-auth/oauth/logout') let logout = () => http.get('/blade-auth/oauth/logout')
let register = (params, config = {}) => http.post('/blade-auth/oauth/token', params, config) // 注册
let registerUser = (params) => http.post('/blade-system/user/register/save-user', params, {
authorization: false,
isparams: true
})
// 发送验证码 /
let sendVerify = (params) => http.get('/blade-system/user/register/send-verify-code', params, {
authorization: false,
isparams: true
})
// 首页 // 首页
let getworkbench = () => http.post('/blade-auth/oauth/token', params, config) let getworkbench = () => http.post('/blade-auth/oauth/token', params, config)
@ -133,23 +143,23 @@ const install = (Vue, vm) => {
}) })
// 需求编辑 editData // 需求编辑 editData
let editData = (params) => http.post('/workOrder/update', params, { let editData = (params) => http.post('/workOrder/update', params, {
authorization: false, authorization: false,
isparams: false isparams: false
}) })
// 维修人员驳回 / // 维修人员驳回 /
let repairReject = (params) => http.post('/workOrder/repairReject', params, { let repairReject = (params) => http.post('/workOrder/repairReject', params, {
authorization: false, authorization: false,
isparams: false isparams: false
}) })
// 申领单提交 / // 申领单提交 /
let applySave = (params) => http.post('/apply/save', params, { let applySave = (params) => http.post('/apply/save', params, {
authorization: false, authorization: false,
isparams: false isparams: false
}) })
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = { getTenantInfo, login, logout, register, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList,upkeepStat,pieStat,getUserInfo,overview,sendOrders,cloneOrder,editData,repairReject,applySave }; vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave,sendVerify };
} }
export default { export default {

@ -144,18 +144,19 @@ export default {
}, },
getCode() { getCode() {
if (this.$refs.uCode.canGetCode) { if (this.$refs.uCode.canGetCode) {
// this.$emit("ch");
uni.showLoading({ // //
title: "正在获取验证码", // uni.showLoading({
}); // title: "",
setTimeout(() => { // });
uni.hideLoading(); // setTimeout(() => {
// this.start() // uni.hideLoading();
uni.$u.toast("验证码已发送"); // // this.start()
this.$emit("ch"); // uni.$u.toast("");
//
this.$refs.uCode.start(); // //
}, 2000); // this.$refs.uCode.start();
// }, 2000);
} else { } else {
uni.$u.toast("倒计时结束后再发送"); uni.$u.toast("倒计时结束后再发送");
} }
@ -164,8 +165,22 @@ export default {
// uni.$u.toast(""); // uni.$u.toast("");
}, },
start() { start() {
// this.$refs.uCode.start();
// uni.$u.toast(""); // uni.$u.toast("");
}, },
sendSuceess(){
uni.showLoading({
title: "正在获取验证码",
});
setTimeout(() => {
uni.hideLoading();
// this.start()
uni.$u.toast("验证码已发送");
//
this.$refs.uCode.start();
}, 2000);
},
// //
ch(e) { ch(e) {
this.$emit("changevalue", e); this.$emit("changevalue", e);

@ -8,7 +8,7 @@
<image class="video-img" v-if="isVideo(item)" @click="previewVideo(item)" src="@/static/images/submit/video.svg" <image class="video-img" v-if="isVideo(item)" @click="previewVideo(item)" src="@/static/images/submit/video.svg"
mode="aspectFill"></image> mode="aspectFill"></image>
</view> </view>
<view class="upload" @click="chooseFile" v-if="!disabled"> <view class="upload" @click="chooseFile" v-if="!disabled && (fileList.length < 3)">
<u-icon size="28" name="plus" color="rgba(139,146,155,1)"></u-icon> <u-icon size="28" name="plus" color="rgba(139,146,155,1)"></u-icon>
</view> </view>
@ -79,7 +79,15 @@ export default {
success: (res) => { success: (res) => {
this.$refs.BetLoading.show() this.$refs.BetLoading.show()
// //
this.uploadFile(res.tempFilePaths[0]); const tempFilePaths = res.tempFilePaths;
uni.compressImage({
src: tempFilePaths[0], //
quality: 50, // 0 - 100100
success: (compressRes) => {
const compressedFilePath = compressRes.tempFilePath;
this.uploadFile(compressedFilePath);
}
})
}, },
}); });
}, },
@ -89,20 +97,28 @@ export default {
sourceType: ["album", "camera"], sourceType: ["album", "camera"],
success: (res) => { success: (res) => {
this.$refs.BetLoading.show() this.$refs.BetLoading.show()
const tempFilePaths = res.tempFilePaths;
// //
this.uploadFile(res.tempFilePath); // this.uploadFile(res.tempFilePath);
uni.compressVideo({ //
src:tempFilePaths,
quality:1,
success:(compressRes)=>{
this.uploadFile(compressRes.tempFilePath);
},
})
}, },
}); });
}, },
uploadFile(filePath) { uploadFile(filePath) {
uni.uploadFile({ uni.uploadFile({
url: website.baseUrl+"/blade-resource/oss/endpoint/put-file", // url: website.baseUrl + "/blade-resource/oss/endpoint/put-file", //
filePath: filePath, filePath: filePath,
name: "file", // name: "file", //
formData: {}, formData: {},
success: (res) => { success: (res) => {
let info = JSON.parse(res.data); let info = JSON.parse(res.data);
// console.log("", info); // console.log("上传成功", info); //
this.fileList.push({ this.fileList.push({
'link': info.data.link, 'link': info.data.link,
@ -157,14 +173,16 @@ export default {
overflow: hidden; overflow: hidden;
margin-right: 30rpx; margin-right: 30rpx;
position: relative; position: relative;
// margin-top: 32rpx; margin-bottom: 32rpx;
background: #fff; background: #fff;
border: 1px solid rgba(217, 217, 217, 1); border: 1px solid rgba(217, 217, 217, 1);
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.video-img{
.video-img {
width: 50%; width: 50%;
height: 50%; height: 50%;
margin: auto; margin: auto;
@ -174,6 +192,7 @@ export default {
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
.del-icon { .del-icon {
position: absolute; position: absolute;
top: 8rpx; top: 8rpx;
@ -197,10 +216,11 @@ export default {
border-radius: 10rpx; border-radius: 10rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.icon-close{
position: absolute; .icon-close {
top: 40rpx; position: absolute;
right: 40rpx; top: 40rpx;
} right: 40rpx;
}
} }
</style> </style>

@ -3,41 +3,42 @@
<view class="container"> <view class="container">
<betone-header-top :title="title" /> <betone-header-top :title="title" />
<u-form labelPosition="left" :model="registerInfo" :rules="rules" ref="registerForm"> <u-form labelPosition="left" :model="registerInfo" :rules="rules" ref="registerForm">
<u-form-item prop="businessName" ref="item1" :border-bottom="false" label-width="0"> <u-form-item prop="businessName" :border-bottom="false" label-width="0">
<betone-new-input label="企业名称" v-model="registerInfo.businessName" placeholder="请输入" :isRequire="true" /> <betone-new-input label="企业名称" v-model="registerInfo.businessName" placeholder="请输入" :isRequire="true" />
</u-form-item> </u-form-item>
<u-form-item prop="area" ref="item1" :border-bottom="false" label-width="0"> <u-form-item prop="area" :border-bottom="false" label-width="0">
<view @click.stop="addMap()" style="width: 100%;height: 100%;"> <view @click.stop="addMap()" style="width: 100%;height: 100%;">
<betone-new-input label="实验室地址" v-model="registerInfo.area" placeholder="请选择" :isRequire="true" <betone-new-input label="实验室地址" v-model="registerInfo.area" placeholder="请选择" :isRequire="true"
type="select" /> type="select" />
</view> </view>
</u-form-item> </u-form-item>
<u-form-item prop="personName" ref="item1" :border-bottom="false" label-width="0"> <u-form-item prop="personName" :border-bottom="false" label-width="0">
<betone-new-input label="负责人姓名" v-model="registerInfo.personName" placeholder="请输入" :isRequire="true" /> <betone-new-input label="负责人姓名" v-model="registerInfo.personName" placeholder="请输入" :isRequire="true" />
</u-form-item> </u-form-item>
<u-form-item prop="phoneNumber" ref="item1" :border-bottom="false" label-width="0"> <u-form-item prop="phoneNumber" :border-bottom="false" label-width="0">
<betone-new-input label="手机号" v-model="registerInfo.phoneNumber" placeholder="请输入" :isRequire="true" /> <betone-new-input label="手机号" v-model="registerInfo.phoneNumber" placeholder="请输入" :isRequire="true" />
</u-form-item> </u-form-item>
<u-form-item prop="password" ref="item1" :border-bottom="false" label-width="0"> <u-form-item prop="verificationCode" :border-bottom="false" label-width="0">
<betone-new-input label="手机验证码" v-model="registerInfo.verificationCode" placeholder="请输入手机6位数验证码"
:isSms="true" @ch="sendCode" :isRequire="true" ref="verificationCode" />
</u-form-item>
<u-form-item prop="password" :border-bottom="false" label-width="0">
<betone-new-input label="设置密码" v-model="registerInfo.password" placeholder="请输入8-16位数字与字母的组合" <betone-new-input label="设置密码" v-model="registerInfo.password" placeholder="请输入8-16位数字与字母的组合"
:isRequire="true" type="password" /> :isRequire="true" type="password" />
</u-form-item> </u-form-item>
<u-form-item prop="confirmPassword" ref="item1" :border-bottom="false" label-width="0"> <u-form-item prop="confirmPassword" :border-bottom="false" label-width="0">
<betone-new-input label="确认密码" v-model="registerInfo.confirmPassword" placeholder="请再次输入密码" :isRequire="true" <betone-new-input label="确认密码" v-model="registerInfo.confirmPassword" placeholder="请再次输入密码" :isRequire="true"
type="password" /> type="password" />
</u-form-item> </u-form-item>
<u-form-item prop="verificationCode" ref="item1" :border-bottom="false" label-width="0">
<betone-new-input label="手机验证码" v-model="registerInfo.verificationCode" placeholder="请输入手机6位数验证码" <u-form-item prop="checked" :border-bottom="false">
:isSms="true" @ch="sendCode" :isRequire="true" />
</u-form-item>
<u-form-item prop="checked" ref="item1" :border-bottom="false">
<u-checkbox-group style="margin-bottom: 16rpx" shape="square"> <u-checkbox-group style="margin-bottom: 16rpx" shape="square">
<u-checkbox v-model="registerInfo.checked" key="index" labelSize="24" <u-checkbox v-model="registerInfo.checked" key="index" labelSize="24"
name="我已阅读并接受《注册服务协议》及《隐私权政策》">我已阅读并接受注册服务协议隐私权政策</u-checkbox> name="我已阅读并接受《注册服务协议》及《隐私权政策》">我已阅读并接受注册服务协议隐私权政策</u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</u-form-item> </u-form-item>
</u-form> </u-form>
<u-button class="item-bottom" type="primary" @click="formSubmit"> <u-button class="item-bottom" type="primary" @click="formSubmit()">
注册 注册
</u-button> </u-button>
</view> </view>
@ -46,7 +47,7 @@
:showResetting='mapInfo.showResetting' :listIco='mapInfo.listIco' :orientationIco='mapInfo.orientationIco' :showResetting='mapInfo.showResetting' :listIco='mapInfo.listIco' :orientationIco='mapInfo.orientationIco'
:resettingIco='mapInfo.resettingIco'></map-Point> :resettingIco='mapInfo.resettingIco'></map-Point>
</betone-dialog> </betone-dialog>
<betone-loading ref="BetLoading"></betone-loading>
</view> </view>
</template> </template>
<script> <script>
@ -129,6 +130,7 @@ export default {
if (value != this.registerInfo.password) { if (value != this.registerInfo.password) {
callback(new Error('两次密码校验不一致')) callback(new Error('两次密码校验不一致'))
} }
callback()
}, },
message: '两次密码校验不一致', message: '两次密码校验不一致',
trigger: ["blur"] trigger: ["blur"]
@ -156,8 +158,8 @@ export default {
resettingIco: "/uni_modules/map-Point/static/position.png", resettingIco: "/uni_modules/map-Point/static/position.png",
showResetting: true, showResetting: true,
Radius: '', Radius: '',
} },
selectMap: {},//
}; };
}, },
@ -180,28 +182,66 @@ export default {
}, },
formSubmit() { formSubmit() {
// uni.navigateTo({ this.$nextTick(() => {
// url: "/pages/register/registerSuccess", // uni.navigateTo({
// }); // url: "/pages/register/registerSuccess?account=" + this.registerInfo.phoneNumber + '&pwd=' + this.registerInfo.password,
this.$refs.registerForm.validate(valid => { // });
if (valid) { this.$refs.registerForm.validate(valid => {
if (this.registerInfo.checked.length <= 0) { if (valid) {
uni.$u.toast("请勾选《注册服务协议》及《隐私权政策》"); if (this.registerInfo.checked.length <= 0) {
return false; uni.$u.toast("请勾选《注册服务协议》及《隐私权政策》");
return false;
}
this.$refs.BetLoading.show();
let query_ = {
"deptName": this.registerInfo.businessName,//
"address": this.registerInfo.area,//
"name": this.registerInfo.personName,//
"phone": this.registerInfo.phoneNumber,//
"password": this.registerInfo.password,//
"addressLon": this.selectMap.location.split(',')[0],//
"addressLat": this.selectMap.location.split(',')[1],//
"verifyCode": this.registerInfo.verificationCode,//
}
this.$u.api.registerUser(query_).then(res => {
this.$refs.BetLoading.hide();
if (res.code == 200) {
setTimeout(() => {
uni.navigateTo({
url: "/pages/register/registerSuccess?account=" + this.registerInfo.phoneNumber + '&pwd=' + this.registerInfo.password,
});
}, 1000)
} else {
uni.$u.toast(res.msg);
}
}).finally(err => {
this.$refs.BetLoading.hide();
uni.$u.toast(err.data.msg);
})
} else {
this.$refs.BetLoading.hide();
console.log('验证失败');
} }
console.log('验证通过'); });
} else { })
console.log('验证失败');
}
});
}, },
// //
sendCode() { sendCode() {
setTimeout(() => { if (this.registerInfo.phoneNumber == '') {
// this.isCanSms = true; uni.$u.toast("请先输入手机号");
uni.$u.toast("发送成功"); return false;
}, 1500); }
let query = {
phone: this.registerInfo.phoneNumber
}
this.$u.api.sendVerify(query).then(res => {
if (res.code == 200) {
this.$refs.verificationCode.sendSuceess()
}
})
}, },
// //
addMap() { addMap() {
@ -209,6 +249,8 @@ export default {
}, },
commitCheck(e) { commitCheck(e) {
if (e) { if (e) {
this.selectMap = e
console.log('选中地点', e)
uni.$emit('commitCheck', e); uni.$emit('commitCheck', e);
this.registerInfo.area = e.name this.registerInfo.area = e.name
} }

@ -8,8 +8,9 @@
></u-icon> ></u-icon>
</view> </view>
<view class="suc-title">恭喜您成功注册账号</view> <view class="suc-title">恭喜您成功注册账号</view>
<view class="suc-txt">请等待客服进行审核</view>
<view class="suc-txt">您的账号信息为</view> <view class="suc-txt">您的账号信息为</view>
<view class="suc-txt"> 账号<i>222222222</i> </view> <view class="suc-txt"> 账号<i>{{ account }}</i> </view>
<view class="suc-txt" style="margin-bottom: 128rpx"> <view class="suc-txt" style="margin-bottom: 128rpx">
密码<i v-if="!isView">{{ password | maskText }}</i 密码<i v-if="!isView">{{ password | maskText }}</i
><i v-if="isView">{{ password }}</i> ><i v-if="isView">{{ password }}</i>
@ -30,7 +31,8 @@ export default {
data() { data() {
return { return {
isView: false, isView: false,
password: "999999", password: "",//
account:'',//
}; };
}, },
// Vue // Vue
@ -38,10 +40,17 @@ export default {
maskText(value) { maskText(value) {
return value.replace(/./g, "*"); return value.replace(/./g, "*");
}, },
},
onLoad(option){
this.account = option.account
this.password = option.pwd
},
onShow(){
}, },
methods: { methods: {
linkLogin() { linkLogin() {
uni.navigateTo({ uni.redirectTo({
url: "/pages/login/login", url: "/pages/login/login",
}); });
}, },

@ -1,5 +1,5 @@
<template> <template>
<view class="page-css"> <view class="">
<view class="container"> <view class="container">
<view v-for="(item, index) in breakdownInfo" :key="index"> <view v-for="(item, index) in breakdownInfo" :key="index">
<betone-header-top :titleMin="'故障信息'" /> <betone-header-top :titleMin="'故障信息'" />
@ -209,10 +209,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page-css { // .page-css {
background: #efefef; // background: #efefef;
display: flex; // display: flex;
flex-direction: column; // flex-direction: column;
.container { .container {
flex: 1; flex: 1;
@ -232,5 +232,5 @@ export default {
font-size: 30rpx; font-size: 30rpx;
color: #000000; color: #000000;
} }
} // }
</style> </style>

@ -37,5 +37,6 @@ export default {
background: #efefef; background: #efefef;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
</style> </style>

@ -384,6 +384,11 @@ export default {
uni.showToast({ title: "请选择需要申领的物料信息", icon: "none" }); uni.showToast({ title: "请选择需要申领的物料信息", icon: "none" });
return false return false
} }
//
if (this.selectGoodsList.find(item => item.goodsNum == 0)) {
uni.showToast({ title: "申领数量不能为0", icon: "none" });
return false
}
this.selectGoodsList.forEach((item, index) => { this.selectGoodsList.forEach((item, index) => {
data.push({ data.push({
orderId: this.detailForm.id, orderId: this.detailForm.id,

@ -105,7 +105,8 @@
<u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true" <u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true"
value-name="id" title="选择维修人员"></u-select> value-name="id" title="选择维修人员"></u-select>
<!-- 选择时间 --> <!-- 选择时间 -->
<u-calendar v-model="calendarShow" mode="date" @change="calendarChange"></u-calendar> <u-calendar v-model="calendarShow" mode="date" @change="calendarChange" :disabled-dates="disabledDates"
:min-date="minDate" :max-date="maxDate"></u-calendar>
<!-- 维修人员物料选择 --> <!-- 维修人员物料选择 -->
<betone-dialog v-model="aterialShow" height="900rpx"> <betone-dialog v-model="aterialShow" height="900rpx">
@ -166,7 +167,12 @@ export default {
data() { data() {
return { return {
userInfo:{},// disabledDates: {
to: new Date() //
},
minDate: null,
maxDate: null,
userInfo: {},//
orderId: '',//id orderId: '',//id
detailForm: {},// detailForm: {},//
rules: {}, rules: {},
@ -232,11 +238,12 @@ export default {
this.getRepairPersons()// this.getRepairPersons()//
this.orderId = this.$route.query.id this.orderId = this.$route.query.id
this.getDtails() this.getDtails()
this.userInfo = uni.getStorageSync("userinfo"); this.userInfo = uni.getStorageSync("userinfo");
// //
if (this.dataTypes == 4) { if (this.dataTypes == 4) {
this.getGoodsList() this.getGoodsList()
} }
this.initDate()
}, },
methods: { methods: {
getDtails() { getDtails() {
@ -394,35 +401,39 @@ export default {
customerOpinion: this.detailForm.customerOpinion customerOpinion: this.detailForm.customerOpinion
} }
// //
if (this.sendOrder.isNeedMaterials == 1) { if (this.sendOrder.isNeedMaterials == 1 && this.sendOrder.materialsData.length <= 0) {
// uni.showToast({ title: "请选择需要的申领材料", icon: "none" });
// if (this.sendOrder.materialsData.find(item => item.goodsNum == 0)) { return false
// uni.showToast({ title: "0", icon: "none" }); }
// } //
let data = [] if (this.sendOrder.materialsData.find(item => item.goodsNum == 0)) {
console.log('this.materialsData', this.sendOrder.materialsData) uni.showToast({ title: "申领数量不能为0", icon: "none" });
this.sendOrder.materialsData.map(item => { return false
data.push({ }
productId: item.productName,//id let data = []
productName: item.name, // console.log('this.materialsData', this.sendOrder.materialsData)
brand: item.brand,// this.sendOrder.materialsData.map(item => {
xh: item.xh,// data.push({
rule: item.rule,// productId: item.productName,//id
applyNum: item.applyNum,// productName: item.name, //
}) brand: item.brand,//
}) xh: item.xh,//
let query1 = { rule: item.rule,//
details: data, applyNum: item.applyNum,//
applyUserId: this.userInfo.user_id, //Id
applyUser: this.userInfo.user_name, //
applyTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//(yyyy-MM-dd HH:mm:ss)
status: 0,
workId: this.orderId,
}
this.$u.api.applySave(query1).then(res => {
}) })
})
let query1 = {
details: data,
applyUserId: this.userInfo.user_id, //Id
applyUser: this.userInfo.user_name, //
applyTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//(yyyy-MM-dd HH:mm:ss)
status: 0,
workId: this.orderId,
} }
this.$u.api.applySave(query1).then(res => {
})
this.$u.api.editData(query).then(res => { this.$u.api.editData(query).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "派单成功", icon: "none" }); uni.showToast({ title: "派单成功", icon: "none" });
@ -454,6 +465,39 @@ export default {
}) })
}, },
initDate() {
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (month < 10) {
month = "0" + month;
}
if (day < 10) {
day = "0" + day;
}
let minyear = year - 1;
this.minDate = minyear + "-" + month + "-" + day;
//let maxyear = year + 1;
this.maxDate = year + 1 + "-" + month + "-" + day; //
//this.maxDate = year  + '-'+ month +'-' + day; //
},
} }
} }
</script> </script>

@ -56,9 +56,11 @@ const install = (Vue, vm) => {
// 响应拦截,判断状态码是否通过 // 响应拦截,判断状态码是否通过
Vue.prototype.$u.http.interceptor.response = (res) => { Vue.prototype.$u.http.interceptor.response = (res) => {
const data = res.data console.log('接口返回拦截',res)
let status = res.data ? res.data.code : (res.error_code ? res.error_code : ''); const data = res
const message = res.data ? res.data.msg || res.error_description || '未知错误' : ''; let status = res.code || res.status;
const message = res.msg || res.error_description || '未知错误';
if (!!res.error_code) { if (!!res.error_code) {
uni.showToast({ uni.showToast({
title: res.error_description, title: res.error_description,
@ -81,13 +83,13 @@ const install = (Vue, vm) => {
// return false; // return false;
// } // }
// // 如果请求为非200否者默认统一处理 // // 如果请求为非200否者默认统一处理
// if (status !== 200) { if (status !== 200) {
// uni.showToast({ uni.showToast({
// title: message, title: message,
// icon: 'none' icon: 'none'
// }); });
// return false; return false;
// } }
return res; return res;
// if(res.code == 200) { // if(res.code == 200) {
// // res为服务端返回值,可能有code,result等字段 // // res为服务端返回值,可能有code,result等字段

@ -55,7 +55,7 @@ const repair = [{
}, { }, {
iconPath: "setting", iconPath: "setting",
selectedIconPath: "setting-fill", selectedIconPath: "setting-fill",
text: "维任务", text: "维任务",
pagePath: "/pages/inspection/quest", pagePath: "/pages/inspection/quest",
}, { }, {
iconPath: "account", iconPath: "account",

@ -2,51 +2,12 @@
* 全局配置文件 * 全局配置文件
*/ */
export default { export default {
baseUrl:'http://124.221.142.15:8088/lab', // baseUrl: 'http://124.221.142.15:8088/lab',
title: "", baseUrl:'http://192.168.0.111:80',
logo: "S",
key: "saber", //配置主键,目前用于存储
indexTitle: "科研医疗建筑运维平台", indexTitle: "科研医疗建筑运维平台",
clientId: "saber", // 客户端id clientId: "saber", // 客户端id
clientSecret: "saber_secret", // 客户端密钥 clientSecret: "saber_secret", // 客户端密钥
tenantMode: true, // 是否开启租户模式
tenantId: "000000", // 管理组租户编号
captchaMode: true, // 是否开启验证码模式
switchMode: false, // 是否开启部门切换模式
lockPage: "/lock",
tokenTime: 3000, tokenTime: 3000,
tokenHeader: "Blade-Auth", tokenHeader: "Blade-Auth",
//http的status默认放行列表
statusWhiteList: [],
//配置首页不可关闭
isFirstPage: false,
fistPage: {
label: "首页",
value: "/wel/index",
params: {},
query: {},
meta: {
i18n: "dashboard",
},
group: [],
close: false,
},
//配置菜单的属性
menu: {
iconDefault: "iconfont icon-caidan",
props: {
label: "name",
path: "path",
icon: "source",
children: "children",
},
},
// 第三方系统授权地址
authUrl: "http://localhost/blade-auth/oauth/render",
// 报表设计器地址(cloud端口为8108,boot端口为80)
reportUrl: "http://localhost:8108/ureport",
// 单点登录系统认证(blade-auth服务的地)
ssoUrl: "http://localhost:8100/oauth/authorize?client_id=saber&response_type=code&redirect_uri=",
// 单点登录回调地址(Saber服务的地址)
redirectUri: "http://localhost:1888",
}; };
Loading…
Cancel
Save