Compare commits

..

No commits in common. "ccf8482af8782957eefbf0a3c2d41d83db773424" and "0afc0cecb4f265872f549aa8cc3bd2761bbd055c" have entirely different histories.

10 changed files with 120 additions and 153 deletions

View File

@ -36,7 +36,7 @@ var proxyUrl =
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static01',
assetsPublicPath: '/bigScrap/',
assetsPublicPath: '/bigScrap',
productionSourceMap: false,
devtool: '#source-map',
productionGzip: false,

View File

@ -6,5 +6,5 @@ module.exports = {
NODE_ENV: '"production"',
//post用当前域名
// API_ROOT: '"http://' + testUrl + '/iot"'
// API_ROOT: '/sgzbgl-api/',
// API_ROOT: '/',
}

View File

@ -2,18 +2,12 @@
* axios全局配置
*/
import axios from 'axios';
// axios.defaults.timeout = 30000
axios.defaults.timeout = 30000
// 默认配置
// axios.defaults.baseURL = process.env.API_ROOT;
// axios.defaults.baseURL = '/sgzbgl-api/';
axios.defaults.baseURL = process.env.API_ROOT;
const axiosService = axios.create({
baseURL: "http://192.168.8.163:21624/sgzbgl-api/",// you can use "process.env.VUE_APP_BASE_API" too
timeout: 30000
})
axiosService.interceptors.request.use(
axios.interceptors.request.use(
config => {
let token = localStorage.getItem('token')
if (token) {
@ -28,7 +22,7 @@ axiosService.interceptors.request.use(
);
// 添加一个请求拦截器
axiosService.interceptors.response.use(
axios.interceptors.response.use(
response => {
if (response.data) {
if (response.data.code === 401) {
@ -51,21 +45,19 @@ axiosService.interceptors.response.use(
// 通用POST方法
export const POST = (url, params) => {
return axiosService.post(`${url}`, params).then(response => response);
return axios.post(`${url}`, params).then(response => response);
};
// 通用POST_JSON方法
export const POST_JSON = (url, json, params) => {
return axiosService.post(`${url}`, json, {
return axios.post(`${url}`, json, {
params: params
}).then(response => response);
};
// 通用GET方法
export const GET = (url, params) => {
return axiosService.get(`${url}`, {
return axios.get(`${url}`, {
params: params
}).then(response => response);
};

View File

@ -12,61 +12,54 @@
</template>
<script>
import { getAcceptanceStorageApi } from '../../api/screen'
import { getAcceptanceStorageApi } from "../../api/screen";
import inputStoreAnalysisDialog from './inputStoreAnalysisDialog.vue'
import * as echarts from 'echarts'
import * as echarts from 'echarts';
export default {
name: 'accessRatePage',
components: {
inputStoreAnalysisDialog,
inputStoreAnalysisDialog
},
data() {
return {
dataObj: {},
maType: '',
maType: ''
}
},
mounted() {
this.$eventBus.$on('maType', (maType) => {
this.maType = maType
this.getAcceptanceStorageApiPage()
})
});
setInterval(() => {
this.getAcceptanceStorageApiPage()
}, 60 * 1000)
}, 60 * 1000);
},
destroyed() {
this.$eventBus.$off('maType')
this.$eventBus.$off('maType');
},
methods: {
getAcceptanceStorageApiPage() {
this.dataObj = {}
let params = {
maType: this.maType,
maType: this.maType
}
getAcceptanceStorageApi(params).then((res) => {
getAcceptanceStorageApi(params).then(res => {
if (res.code == 200) {
this.dataObj = res.data
this.getInitDataBar()
this.getInitDataBar();
}
})
},
getInitDataBar() {
const data = [70, 80, 60, 55, 43, 82, 66, 14]
const data2 = [26, 45, 56, 90, 23, 72, 46, 174]
const colorArr2 = [
'rgba(11, 83, 128)',
'rgba(2, 143, 224)',
'rgba(11, 83, 128)',
]
const colorArr = [
'rgb(12, 109, 122)',
'rgba(1, 241, 228)',
'rgb(12, 109, 122)',
]
const data = [70, 80, 60, 55, 43, 82, 66, 14];
const data2 = [26, 45, 56, 90, 23, 72, 46, 174];
const colorArr2 = ["rgba(11, 83, 128)", "rgba(2, 143, 224)", "rgba(11, 83, 128)"];
const colorArr = ["rgb(12, 109, 122)", "rgba(1, 241, 228)", "rgb(12, 109, 122)"];
var color = {
type: 'linear',
type: "linear",
x: 0,
x2: 1,
y: 0,
@ -89,9 +82,9 @@ export default {
color: colorArr[1],
},
],
}
};
var color2 = {
type: 'linear',
type: "linear",
x: 0,
x2: 1,
y: 0,
@ -114,20 +107,20 @@ export default {
color: colorArr2[1],
},
],
}
var barWidth = 30
};
var barWidth = 30;
var option = {
backgroundColor: 'transparent',
tooltip: {
trigger: 'axis',
formatter: function (params) {
var str = params[0].name + ':'
var str = params[0].name + ":";
params.filter(function (item) {
if (item.componentSubType == 'bar') {
str += '<br/>' + item.seriesName + '' + item.value
if (item.componentSubType == "bar") {
str += "<br/>" + item.seriesName + "" + item.value;
}
})
return str
});
return str;
},
},
legend: {
@ -136,7 +129,7 @@ export default {
itemHeight: 12,
itemGap: 10,
icon: 'circle',
x: 'right',
x: "right",
y: '4%',
data: ['验收数量', '入库数量'],
textStyle: {
@ -151,7 +144,7 @@ export default {
right: '4%',
bottom: '5%',
top: '15%',
containLabel: true,
containLabel: true
},
xAxis: {
type: 'category',
@ -162,7 +155,7 @@ export default {
lineStyle: {
color: '#c1c1c1',
width: 1, //
},
}
},
axisLabel: {
show: true,
@ -183,13 +176,13 @@ export default {
color: '#17273B',
width: 1,
type: 'dashd',
},
}
},
axisTick: {
show: false,
show: false
},
axisLine: {
show: false,
show: false
},
//
axisLabel: {
@ -197,36 +190,36 @@ export default {
color: '#c1c1c1',
fontSize: 14,
formatter: function (value) {
return value
},
return value;
}
},
},
series: [
{
z: 1,
name: '入库数量',
type: 'bar',
type: "bar",
barWidth: barWidth,
barGap: '0%',
barGap: "0%",
data: this.dataObj.valueList2,
itemStyle: {
normal: {
color: color,
},
}
},
},
//
{
z: 2,
name: '入库数量',
type: 'pictorialBar',
data: this.dataObj.valueList2.map((item) => item + 90),
symbol: 'diamond',
symbolOffset: ['-75%', '50%'],
type: "pictorialBar",
data: this.dataObj.valueList2.map(item => item + 90),
symbol: "diamond",
symbolOffset: ["-75%", "50%"],
symbolSize: [barWidth, 10],
itemStyle: {
normal: {
color: color,
color: color
},
},
tooltip: {
@ -237,16 +230,16 @@ export default {
{
z: 3,
name: '入库数量',
type: 'pictorialBar',
symbolPosition: 'end',
type: "pictorialBar",
symbolPosition: "end",
data: this.dataObj.valueList2,
symbol: 'diamond',
symbolOffset: ['-85%', '-60%'],
symbol: "diamond",
symbolOffset: ["-85%", "-60%"],
symbolSize: [barWidth - 4, (10 * (barWidth - 4)) / barWidth],
itemStyle: {
normal: {
borderWidth: 1,
color: '#00FEFC',
color: '#00FEFC'
},
},
tooltip: {
@ -256,9 +249,9 @@ export default {
{
z: 1,
name: '验收数量',
type: 'bar',
type: "bar",
barWidth: barWidth,
barGap: '50%',
barGap: "50%",
data: this.dataObj.valueList,
itemStyle: {
normal: {
@ -268,23 +261,23 @@ export default {
show: false,
textStyle: {
color: 'rgb(2, 157, 246)',
fontSize: 8,
},
fontSize: 8
}
},
},
}
},
},
{
z: 2,
name: '验收数量',
type: 'pictorialBar',
data: this.dataObj.valueList.map((item) => item + 90),
symbol: 'diamond',
symbolOffset: ['75%', '50%'],
type: "pictorialBar",
data: this.dataObj.valueList.map(item => item + 90),
symbol: "diamond",
symbolOffset: ["75%", "50%"],
symbolSize: [barWidth, 10],
itemStyle: {
normal: {
color: color2,
color: color2
},
},
tooltip: {
@ -294,16 +287,16 @@ export default {
{
z: 3,
name: '验收数量',
type: 'pictorialBar',
symbolPosition: 'end',
type: "pictorialBar",
symbolPosition: "end",
data: this.dataObj.valueList,
symbol: 'diamond',
symbolOffset: ['75%', '-50%'],
symbol: "diamond",
symbolOffset: ["75%", "-50%"],
symbolSize: [barWidth - 4, (10 * (barWidth - 4)) / barWidth],
itemStyle: {
normal: {
borderWidth: 1,
color: colorArr2[2],
color: colorArr2[2]
},
},
tooltip: {
@ -312,13 +305,11 @@ export default {
},
],
}
let myCharts = echarts.init(
document.querySelector('#accessRateEchartsCenterBar')
)
let myCharts = echarts.init(document.querySelector('#accessRateEchartsCenterBar'));
myCharts.setOption(option)
myCharts.off('click')
myCharts.on('click', (params) => {
console.log('🚀 ~ myCharts.on ~ params:', params)
console.log('🚀 ~ myCharts.on ~ params:', params);
const data = {
open: true,
maType: this.maType,
@ -328,7 +319,7 @@ export default {
// this.$refs.inputStoreAnalysisDialog.setOpen(data)
})
},
},
}
}
</script>

View File

@ -70,20 +70,16 @@ router.beforeEach(async (to, from, next) => {
if (to.path === '/login/index') {
return next();
}
if (to.query.token) {
localStorage.setItem('token', to.query.token)
}
const token = to.query.token || localStorage.getItem('token') || null;
const token = localStorage.getItem('token');
if (!token) {
next('/bigScrap/login/index'); // 跳转到登录页
next('/login/index'); // 跳转到登录页
} else {
next(); // 放行
}
});
// if (to.matched.some(r => r.meta.requireLoginAuth)) {
// next();
// } else {

View File

@ -7,18 +7,22 @@
</template>
<script>
import ScaleBox from '@/components/scaleBox.vue'
import ScaleBox from "@/components/scaleBox.vue";
export default {
name: 'layout',
components: { ScaleBox },
data() {
return {}
return {
}
},
mounted() {
// console.log(this.$route)
// localStorage.setItem('token', this.$route.query.token)
localStorage.setItem('token', this.$route.query.token)
},
methods: {},
methods: {
}
}
</script>

View File

@ -107,25 +107,20 @@
</div>
</template>
<script>
import {
authLoginApi,
getSendIphoneCodeApi,
loginCodeApi,
} from '../../api/userLogin'
import { authLoginApi, getSendIphoneCodeApi, loginCodeApi } from "../../api/userLogin";
export default {
name: 'Login',
data() {
const validatePhone = (rule, value, callback) => {
const reg =
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (!value) {
callback(new Error('请输入手机号'))
callback(new Error('请输入手机号'));
} else if (!reg.test(value)) {
callback(new Error('请输入正确的手机号'))
callback(new Error('请输入正确的手机号'));
} else {
callback()
callback();
}
}
};
return {
isButtonState: false,
isCode: true,
@ -134,13 +129,13 @@ export default {
showPwd: false,
captcha: '',
form: {
userName: '',
passWord: '',
userName: "",
passWord: "",
phone: '',
phoneCode: '',
phoneCode: ''
},
UserLogin: true,
codeUrl: '',
codeUrl: "",
rules: {
userName: [
{ required: true, message: '账号不能为空', trigger: 'blur' },
@ -149,25 +144,20 @@ export default {
{ required: true, message: '密码不能为空', trigger: 'blur' },
],
phone: [
{
validator: validatePhone,
message: '请输入正确的手机号',
trigger: 'blur',
},
{ validator: validatePhone, message: '请输入正确的手机号', trigger: 'blur' },
{ required: true, message: '手机号码不能为空', trigger: 'blur' },
],
phoneCode: [
{ required: true, message: '验证码不能为空', trigger: 'blur' },
],
},
type: 1,
type: 1
}
},
mounted() {
console.log(this.$route)
if (localStorage.getItem('token') != '') {
// this.$router.push('./Home/index')
// location.href('/bigScrap/Home/index')
if(localStorage.getItem('token')!=''){
this.$router.push('./Home/index')
}
},
@ -182,7 +172,7 @@ export default {
username: this.form.userName,
password: this.form.passWord,
}
authLoginApi(params).then((res) => {
authLoginApi(params).then(res => {
if (res.code == 200) {
localStorage.setItem('token', res.data.access_token)
this.$router.push('./Home/index')
@ -193,9 +183,9 @@ export default {
})
} else {
this.isButtonState = false
return false
return false;
}
})
});
}
if (this.type == 2) {
this.isButtonState = true
@ -206,7 +196,7 @@ export default {
phone: this.form.phone,
code: this.form.phoneCode,
}
loginCodeApi(params).then((res) => {
loginCodeApi(params).then(res => {
if (res.code == 200) {
localStorage.setItem('token', res.data.access_token)
this.$router.push('./Home/index')
@ -217,10 +207,11 @@ export default {
})
} else {
this.isButtonState = false
return false
return false;
}
})
});
}
},
loginWayClick(type) {
if (type == 1) {
@ -228,27 +219,26 @@ export default {
this.UserLogin = true
this.loginWay = true
this.form = {}
this.$refs.form.resetFields()
this.$refs.form.resetFields();
} else {
this.type = 2
this.UserLogin = false
this.loginWay = false
this.form = {}
this.$refs.form.resetFields()
this.$refs.form.resetFields();
}
},
getCode() {
const regex =
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ //
const regex = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //
let reg = regex.test(this.form.phone)
if (!reg) {
this.$refs.form.validateField('phone')
this.$refs.form.validateField("phone");
} else {
this.isCode = false
let params = {
phone: this.form.phone,
phone: this.form.phone
}
getSendIphoneCodeApi(params).then((res) => {
getSendIphoneCodeApi(params).then(res => {
if (res.code == 200) {
this.$message.success('短信发送成功!')
}
@ -283,8 +273,8 @@ export default {
alert('图片验证码不正确')
}
}
},
},
}
}
}
</script>
<style lang="scss" scoped>

View File

@ -476,7 +476,7 @@ export default {
},
companyId: '',
createBy: '',
// isEdit: 'true',
isEdit: 'true',
rowId: '',
}
},
@ -493,10 +493,7 @@ export default {
// }
if (this.rejectId) {
this.rowId = this.rejectId
this.GetViewByApply({
id: this.rejectId,
agreementId: this.agreementId,
})
this.GetViewByApply({ id: this.rejectId, agreementId: this.agreementId})
}
getInfo().then((res) => {
this.companyId = res.user.companyId
@ -562,10 +559,7 @@ export default {
//
async GetViewByApply(params) {
const res = await materialReturnNoteByApply({
id: params.id,
agreementId: params.agreementId,
})
const res = await materialReturnNoteByApply({ id: params.id, agreementId: params.agreementId})
const data = res.data[0]
// console.log(data)
// this.queryParams.taskId = data.taskId

View File

@ -4,7 +4,6 @@
</template>
<script>
import { getToken } from '@/utils/auth'
export default {
data() {
return {
@ -25,7 +24,8 @@ export default {
methods: {
openNewWindow() {
window.open(
`${this.jumpUrl}/bigScrap/Home/index?token=${getToken()}`,
`${this.jumpUrl}/bigScrap/index01.html?token=` +
localStorage.getItem('token'),
'_blank',
)
},

View File

@ -42,9 +42,9 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
// target: `http://192.168.2.76:28080`, //超
target: `http://192.168.2.76:28080`, //超
// target: `http://10.40.92.81:8080`, //韩/
target: `http://192.168.2.76:28080`,//旭/
// target: `http://10.40.92.74:8080`,//旭/
//target: `http://192.168.2.248:28080`, //帅
// target: `http://10.40.92.253:28080`, //福