lilu 2 years ago
commit 499cd94813

@ -27,8 +27,8 @@ import VueContextMenu from 'vue-contextmenu'
import vcolorpicker from 'vcolorpicker'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import 'vue-easytable/libs/theme-default/index.css';
import VueEasytable from 'vue-easytable';
import 'vue-easytable/libs/theme-default/index.css'
import VueEasytable from 'vue-easytable'
Vue.use(VXETable)
Vue.use(VueContextMenu)
@ -38,9 +38,10 @@ Vue.use(socket, '/hubs/chatHub')
Vue.use(VueAxios)
Vue.use(Dialog)
Vue.use(dataV)
Vue.use(VueEasytable);
Vue.use(VueEasytable)
Vue.prototype.hasPerm = hasBtnPermission
Vue.prototype.applocation = sysApplication
Vue.prototype.$bus = new Vue()
Vue.config.productionTip = false
new Vue({

@ -101,7 +101,8 @@ router.beforeEach((to, from, next) => {
.catch(() => {
console.log('=== 测试跳转页面,获取个人信息失败 ===')
store.dispatch('Logout').then(() => {
next({ path: '/user/login', query: { redirect: to.fullPath } })
// next({ path: '/user/login', query: { redirect: to.fullPath } })
next({ path: '/user/login' })
})
})
store.dispatch('getNoticReceiveList').then(res => {})
@ -115,7 +116,8 @@ router.beforeEach((to, from, next) => {
// 在免登录白名单,直接进入
next()
} else {
next({ path: '/user/login', query: { redirect: to.fullPath } })
// next({ path: '/user/login', query: { redirect: to.fullPath } })
next({ path: '/user/login' })
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
}
}

@ -1,30 +1,11 @@
import Vue from 'vue'
import {
login,
getLoginUser,
logout
} from '@/api/modular/system/loginManage'
import {
sysDictTypeTree
} from '@/api/modular/system/dictManage'
import {
sysMenuChange
} from '@/api/modular/system/menuManage'
import {
ACCESS_TOKEN,
ALL_APPS_MENU,
DICT_TYPE_TREE_DATA,
NOTICE_RECEIVED
} from '@/store/mutation-types'
import {
sysFileInfoPreview
} from '@/api/modular/system/fileManage'
import {
unReadNotice
} from '@/api/modular/system/noticeReceivedManage'
import {
welcome, dateFormat
} from '@/utils/util'
import { login, getLoginUser, logout } from '@/api/modular/system/loginManage'
import { sysDictTypeTree } from '@/api/modular/system/dictManage'
import { sysMenuChange } from '@/api/modular/system/menuManage'
import { ACCESS_TOKEN, ALL_APPS_MENU, DICT_TYPE_TREE_DATA, NOTICE_RECEIVED } from '@/store/mutation-types'
import { sysFileInfoPreview } from '@/api/modular/system/fileManage'
import { unReadNotice } from '@/api/modular/system/noticeReceivedManage'
import { welcome, dateFormat } from '@/utils/util'
import store from '../index'
import router from '../../router'
@ -47,10 +28,7 @@ const user = {
SET_TOKEN: (state, token) => {
state.token = token
},
SET_NAME: (state, {
name,
welcome
}) => {
SET_NAME: (state, { name, welcome }) => {
state.name = name
state.welcome = welcome
},
@ -74,21 +52,25 @@ const user = {
},
APPEND_NOTICE: (state, notice) => {
notice.publicTime = dateFormat(notice.publicTime, 'YYYY-mm-dd HH:MM:SS')
let notices = state.notices;
let temp = notices.rows.filter(m => { return m.value == notice.type })[0]
let other = notices.rows.filter(m => { return m.value != notice.type })
temp.noticeData.unshift(notice);
notices.totalRows++;
let notices = state.notices
let temp = notices.rows.filter(m => {
return m.value == notice.type
})[0]
let other = notices.rows.filter(m => {
return m.value != notice.type
})
temp.noticeData.unshift(notice)
notices.totalRows++
if (temp.noticeData.length > 6) {
temp.noticeData.pop();
temp.noticeData.pop()
}
notices.rows = [];
notices.rows.push(temp);
notices.rows.push.apply(notices.rows, other);
notices.rows = []
notices.rows.push(temp)
notices.rows.push.apply(notices.rows, other)
notices.rows.sort((obj1, obj2) => {
return obj1.index - obj2.index
})
state.notices = notices;
state.notices = notices
},
SET_BOOKINGLIST: (state, list) => {
state.bookingList = list
@ -100,11 +82,10 @@ const user = {
actions: {
// 登录
Login({
commit
}, userInfo) {
Login({ commit }, userInfo) {
return new Promise((resolve, reject) => {
login(userInfo).then(response => {
login(userInfo)
.then(response => {
if (!response.success) {
reject(response.message)
return
@ -114,7 +95,8 @@ const user = {
commit('SET_TOKEN', result)
resolve()
// eslint-disable-next-line handle-callback-err
}).catch(error => {
})
.catch(error => {
// eslint-disable-next-line prefer-promise-reject-errors
reject('后端未启动或代理错误')
})
@ -122,11 +104,10 @@ const user = {
},
// 获取用户信息
GetInfo({
commit
}) {
GetInfo({ commit }) {
return new Promise((resolve, reject) => {
getLoginUser().then(response => {
getLoginUser()
.then(response => {
if (response.success) {
const data = response.data
commit('SET_ADMINTYPE', data.adminType)
@ -140,9 +121,11 @@ const user = {
if (data.avatar != null) {
sysFileInfoPreview({
id: data.avatar
}).then((res) => {
})
.then(res => {
commit('SET_AVATAR', window.URL.createObjectURL(new Blob([res])))
}).catch((err) => {
})
.catch(err => {
this.$message.error('预览错误:' + err.message)
})
// commit('SET_AVATAR', process.env.VUE_APP_API_BASE_URL + '/sysFileInfo/preview?id=' + data.avatar)
@ -152,23 +135,24 @@ const user = {
// eslint-disable-next-line no-undef
reject(new Error(data.message))
}
}).catch(error => {
})
.catch(error => {
reject(error)
})
})
},
// 登出
Logout({
commit,
state
}) {
return new Promise((resolve) => {
logout(state.token).then(() => {
Logout({ commit, state }) {
return new Promise(resolve => {
logout(state.token)
.then(() => {
resolve()
}).catch(() => {
})
.catch(() => {
resolve()
}).finally(() => {
})
.finally(() => {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_BUTTONS', [])
@ -184,7 +168,8 @@ const user = {
// 加载所有字典数据
dictTypeData() {
return new Promise((resolve, reject) => {
sysDictTypeTree().then((data) => {
sysDictTypeTree()
.then(data => {
if (data.success) {
const result = data.data
Vue.ls.set(DICT_TYPE_TREE_DATA, result)
@ -193,25 +178,25 @@ const user = {
// eslint-disable-next-line no-undef
reject(new Error(data.message))
}
}).catch(error => {
})
.catch(error => {
reject(error)
})
})
},
// 切换应用菜单
MenuChange({
commit
}, application) {
return new Promise((resolve) => {
MenuChange({ commit }, application) {
return new Promise(resolve => {
sysMenuChange({
application: application.code
}).then((res) => {
})
.then(res => {
const apps = {
'code': '',
'name': '',
'active': '',
'menu': ''
code: '',
name: '',
active: '',
menu: ''
}
apps.active = true
apps.menu = res.data
@ -235,27 +220,29 @@ const user = {
Vue.ls.set(ALL_APPS_MENU, applocationR)
resolve(res)
const antDesignmenus = res.data
store.dispatch('GenerateRoutes', {
store
.dispatch('GenerateRoutes', {
antDesignmenus
}).then(() => {
})
.then(() => {
router.addRoutes(store.getters.addRouters)
})
// 切换应用刷新整体界面,暂且取消
// window.location.reload()
}).catch(() => {
})
.catch(() => {
resolve()
})
})
},
// 获取收到的通知
getNoticReceiveList({
commit
}) {
getNoticReceiveList({ commit }) {
return new Promise((resolve, reject) => {
unReadNotice({
pageSize: 6
}).then((data) => {
})
.then(data => {
if (data.success) {
const result = data.data
commit('SET_NOTICES', result)
@ -264,31 +251,28 @@ const user = {
// eslint-disable-next-line no-undef
reject(new Error(data.message))
}
}).catch(error => {
})
.catch(error => {
reject(error)
})
})
},
// 设置订舱列表
setBookingList({
commit
}, obj) {
return new Promise((resolve) => {
setBookingList({ commit }, obj) {
return new Promise(resolve => {
commit('SET_BOOKINGLIST', obj)
resolve()
})
},
// 设置需要保存页面
setNeedSavePages({
commit
}, obj) {
return new Promise((resolve) => {
setNeedSavePages({ commit }, obj) {
return new Promise(resolve => {
commit('SET_NEEDSAVEPAGES', obj)
resolve()
})
},
}
}
}

@ -45,7 +45,7 @@
<button @click="TxxpLink"><span class="iconfont icon-dayinxiaopiao"></span>提箱小票</button>
</div>
<div class="btn-list single-view-4">
<a-upload :file-list="fileList" name="file" :customRequest="uploadFile">
<a-upload :file-list="fileList" :before-upload="beforeUpload" name="file" :customRequest="uploadFile">
<button @click="ShowOCR"><span class="iconfont icon-OCR"></span>OCR</button>
</a-upload>
@ -658,9 +658,8 @@ export default {
ctx.lineWidth = 1
this.width = e.offsetX - x
this.height = e.offsetY - y
this.Bx = e.offsetX
this.By = e.offsetY
ctx.strokeRect(x, y, e.offsetX + 5 - x, e.offsetY + 5 - y)
ctx.strokeRect(x, y, e.offsetX - x, e.offsetY - y)
}
},
mousemove(e) {
@ -672,14 +671,14 @@ export default {
this.$refs.myCanvas.getContext('2d').clearRect(0, 0, this.$refs.myCanvas.width, this.$refs.myCanvas.height)
if (this.imgSrc) {
this.flag = true
this.x = e.offsetX + 5 // X
this.y = e.offsetY + 5 // Y
this.x = e.offsetX // X
this.y = e.offsetY // Y
this.CvBoxType = false
this.width = 0
this.height = 0
}
},
mouseup() {
mouseup(e) {
// console.log(this.width, this.flag, this.imgSrc)
this.flag = false
if (this.imgSrc && this.width != 0 && this.height != 0) {
@ -692,10 +691,16 @@ export default {
scale: this.scale
}).then(res => {
this.Rdata = res.data
this.Bx = this.x + this.width
this.By = this.y + this.height
this.CvBoxType = true
})
}
},
beforeUpload(file) {
console.log(this.details, 'this.details')
// this.$bus.$emit('WebTest001', { upFileList: file, attachCode: 'other', attachName: '' })
},
uploadFile(file) {
const formData = new FormData()
formData.append('file', file.file)
@ -1223,6 +1228,7 @@ export default {
}
.OCRBox {
/deep/.ant-drawer-body {
position: relative;
padding: 0 !important;
}
}
@ -1244,9 +1250,9 @@ export default {
}
}
.CV {
width: 100%;
height: auto;
background-repeat: no-repeat;
// width: 100%;
// height: auto;
// background-repeat: no-repeat;
}
@import url('../index.less');
.operation-area {

@ -17,13 +17,13 @@
</div>
</div>
<div class="tip" v-else-if="excuteRulesType === 'fail'">
<div class="rules-label">
<i class="iconfont icon-shibai Warning"></i><span>校验失败</span>
</div>
<div class="rules-label"><i class="iconfont icon-shibai Warning"></i><span>校验失败</span></div>
</div>
<div class="tip no-data" v-else>
<i class="iconfont icon-meiyoudingdan"></i>
<div class="text">暂无校验, <a-button size="small" type="link" class="btn" @click="checkFun"> </a-button></div>
<div class="text">
暂无校验, <a-button size="small" type="link" class="btn" @click="checkFun"> </a-button>
</div>
</div>
</div>
</a-card>
@ -180,7 +180,7 @@
<a-modal
title="新增备注"
:width="900"
:width="700"
:visible="remarkModelvisible"
:confirmLoading="bookingModelconfirm"
:maskClosable="false"
@ -189,7 +189,7 @@
@ok="handleModelSubmit"
@cancel="handleModelCancel"
>
<a-textarea v-model="remarkVal" :auto-size="{ minRows: 3, maxRows: 5 }" />
<a-textarea v-model="remarkVal" :auto-size="{ minRows: 5, maxRows: 7 }" />
</a-modal>
<a-modal
@ -288,7 +288,11 @@ export default {
locaService: []
}
},
created() {},
created() {
this.$bus.$on('WebTest001', val => {
this.WebTest001(val)
})
},
watch: {
'$route.query': {
immediate: true,
@ -400,6 +404,7 @@ export default {
.then(res => {
if (res.success) {
this.fileList = res.data
console.log(this.fileList)
}
})
.catch(err => {
@ -429,12 +434,20 @@ export default {
this.upFileList = newFileList
},
beforeUpload(file) {
debugger
this.upFileList = [...this.upFileList, file]
return false
},
WebTest001(val) {
console.log(val.upFileList)
this.beforeUpload(val.upFileList)
// this.upFileList = this.upFileList.unshift(val.upFileList)
this.attachCode = val.attachCode
this.attachName = val.attachName
this.handleUpload()
},
handleUpload() {
const { upFileList, attachCode, attachName } = this
console.log(upFileList, attachCode, attachName)
if (upFileList.length === 0) {
this.$message.error('请上传文件')
return false
@ -888,7 +901,6 @@ export default {
line-height: 30px;
.text {
display: inline-block;
}
}
}

@ -19,7 +19,7 @@
@search="handleSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:filter-option="filterOption"
:not-found-content="null"
>
<a-select-option v-for="item in CodeData" :key="item.code" :value="item.code">
@ -115,6 +115,9 @@ export default {
},
mounted() {},
methods: {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
CarrierHandleSearch(data) {
commondbCarrierlist({ cnName: data }).then(res => {
this.carrierCodeData = res.data

@ -19,7 +19,7 @@
@search="handleSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:filter-option="filterOption"
:not-found-content="null"
>
<a-select-option v-for="item in CodeData" :key="item.code" :value="item.code">
@ -117,6 +117,9 @@ export default {
},
mounted() {},
methods: {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
CarrierHandleSearch(data) {
commondbCarrierlist({ cnName: data }).then(res => {
this.carrierCodeData = res.data

@ -10,51 +10,14 @@
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
<a-form-item
:label="item.title"
v-if="
item.title != '备注' && item.title != '船公司' && item.title != '箱型' && item.title != '模块'
"
>
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
<a-col :md="8" :sm="24">
<a-form-item label="关键字:">
<a-input v-model="queryParam.KeyWord" allow-clear placeholder="请输入关键字" />
</a-form-item>
<a-form-item :label="item.title" v-if="item.title == '箱型'">
<a-select
allow-clear
show-search
placeholder="请选择箱型"
v-model="queryParam[item.dataIndex]"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
@search="handleSearch"
>
<a-select-option v-for="item in WCodeData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item :label="item.title" v-if="item.title == '船公司'">
<a-select
allow-clear
show-search
placeholder="请选择船公司"
v-model="queryParam[item.dataIndex]"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
@search="handleSearch"
>
<a-select-option v-for="item in carrierCodeData" :key="item.code" :value="item.code">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item :label="item.title" v-if="item.title == '模块'">
<a-select allow-clear placeholder="请选择模块" v-model="queryParam[item.dataIndex]">
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="模块">
<a-select allow-clear placeholder="请选择模块" v-model="queryParam.module">
<a-select-option v-for="item in ModulesData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -189,6 +152,9 @@ export default {
this.init()
},
methods: {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handleSearch(data) {
commondbCtn({ Name: data }).then(res => {
this.WCodeData = res.data
@ -228,7 +194,6 @@ export default {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()

@ -19,7 +19,7 @@
@search="handleSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:filter-option="filterOption"
:not-found-content="null"
>
<a-select-option v-for="item in CodeData" :key="item.code" :value="item.code">
@ -99,6 +99,9 @@ export default {
},
mounted() {},
methods: {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handleSearch(data) {
commondbYardlist({ name: data }).then(res => {
this.CodeData = res.data

@ -19,7 +19,7 @@
@search="handleSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:filter-option="filterOption"
:not-found-content="null"
>
<a-select-option v-for="item in CodeData" :key="item.code" :value="item.code">
@ -101,6 +101,9 @@ export default {
},
mounted() {},
methods: {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handleSearch(data) {
commondbYardlist({ name: data }).then(res => {
this.CodeData = res.data

@ -10,32 +10,14 @@
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
<a-form-item
:label="item.title"
v-if="item.title != '备注' && item.title != '场站' && item.title != '模块'"
>
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
<a-col :md="8" :sm="24">
<a-form-item label="关键字:">
<a-input v-model="queryParam.KeyWord" allow-clear placeholder="请输入关键字" />
</a-form-item>
<a-form-item :label="item.title" v-if="item.title == '场站'">
<a-select
allow-clear
show-search
placeholder="请选择场站"
v-model="queryParam[item.dataIndex]"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
@search="handleSearch"
>
<a-select-option v-for="item in WCodeData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item :label="item.title" v-if="item.title == '模块'">
<a-select allow-clear placeholder="请选择模块" v-model="queryParam[item.dataIndex]">
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="模块">
<a-select allow-clear placeholder="请选择模块" v-model="queryParam.module">
<a-select-option v-for="item in ModulesData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>

@ -17,7 +17,9 @@
</a-col>
</a-row>
<a-row>
<p class="CsFormTitle"><span><i class="iconfont icon-shiyongwendang"></i>基本信息</span></p>
<p class="CsFormTitle">
<span><i class="iconfont icon-shiyongwendang"></i>基本信息</span>
</p>
<a-col :span="6">
<a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
@ -109,7 +111,9 @@
</a-form-item>
</a-col>
</a-row>
<p class="CsFormTitle"><span><i class="iconfont icon-tuandui"></i>联系人信息</span></p>
<p class="CsFormTitle">
<span><i class="iconfont icon-tuandui"></i>联系人信息</span>
</p>
<vxe-toolbar>
<template #buttons>
<vxe-button icon="vxe-icon-square-plus" @click="insertEvent()"></vxe-button>
@ -122,7 +126,7 @@
resizable
show-overflow
:data="ContactsData"
:edit-config="{ trigger: 'click', mode: 'cell' }"
:edit-config="{ trigger: 'click', mode: 'row' }"
>
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column type="seq" width="60"></vxe-column>
@ -162,7 +166,9 @@
</template>
</vxe-column>
</vxe-table>
<p class="CsFormTitle" :style="{ marginTop: '10px' }"><span><i class="iconfont icon-icon_xinyong_xianxing_jijin-217"></i>财务信息</span></p>
<p class="CsFormTitle" :style="{ marginTop: '10px' }">
<span><i class="iconfont icon-icon_xinyong_xianxing_jijin-217"></i>财务信息</span>
</p>
<a-row>
<a-col :span="12">
<a-form-item label="发票抬头" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>

Loading…
Cancel
Save