Commit 40f9e02f by qinjianhui

feat: 添加新增

parent 767df67c
...@@ -6025,8 +6025,7 @@ ...@@ -6025,8 +6025,7 @@
"lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
"dev": true
}, },
"lodash.camelcase": { "lodash.camelcase": {
"version": "4.3.0", "version": "4.3.0",
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
"vue-router": "^3.5.1", "vue-router": "^3.5.1",
"vuex": "^3.6.2", "vuex": "^3.6.2",
"vxe-table": "^3.5.9", "vxe-table": "^3.5.9",
"xe-utils": "^3.5.7" "xe-utils": "^3.5.7",
"lodash": "~4.17.20"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.16", "@babel/core": "^7.12.16",
......
window.apiHostSetting = { window.apiHostSetting = {
VUE_APP_API_URL: '',
VUE_APP_BASE_URL: '', VUE_APP_BASE_URL: '',
VUE_APP_ZIMG_URL: `${location.origin}${location.host.indexOf('test') !== -1 || location.protocol === 'http:' ? '/erpimg/' : ''}`,
} }
...@@ -6,7 +6,5 @@ export function uploadImg(file, params = {}) { ...@@ -6,7 +6,5 @@ export function uploadImg(file, params = {}) {
for (const key in otherParams) { for (const key in otherParams) {
from.append(key, otherParams[key]) from.append(key, otherParams[key])
} }
return axios.post(url || 'upload/fileUpload/images', from, { return axios.post(url || 'platform/upload/fileUpload/images', from)
headers: { 'content-type': 'multipart/form-data' },
})
} }
\ No newline at end of file
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.editor_toolbar >>> .panel_menu li:hover { .editor_toolbar::v-deep .panel_menu li:hover {
background: #efefef; background: #efefef;
} }
</style> </style>
...@@ -6,6 +6,9 @@ import element from '@/common/components/element-ui.js' ...@@ -6,6 +6,9 @@ import element from '@/common/components/element-ui.js'
import vxeTable from '@/common/components/vxeTable.js' import vxeTable from '@/common/components/vxeTable.js'
import './common/style/index.scss' import './common/style/index.scss'
import Directives from './utils/directives' import Directives from './utils/directives'
import { filePath, zImgPath } from './utils/commonUtil'
import md5 from 'js-md5'
import _ from 'lodash'
// import { getToken } from '@/utils/auth' // import { getToken } from '@/utils/auth'
Vue.config.productionTip = false Vue.config.productionTip = false
...@@ -14,6 +17,48 @@ Vue.use(Directives) ...@@ -14,6 +17,48 @@ Vue.use(Directives)
Vue.use(element) Vue.use(element)
Vue.use(vxeTable) Vue.use(vxeTable)
const clientWidth = document.body.clientWidth
const dpi = _.add(
_.ceil(_.divide(clientWidth / 1920)) + 0.5,
)
let imagePath = ''
if (
md5(location.host) === '42f2b26039d7fd526b8a1d50bb329cbc'
) {
localStorage.setItem('locationHost', location.host)
imagePath = zImgPath
} else if (zImgPath.indexOf('/erpimg') !== -1) {
imagePath = zImgPath
} else {
imagePath = 'https://image.jomalls.com/'
}
Vue.prototype.setimgUrl = (url, options = {}) => {
const { w, h, ...others } = options
let query = ''
if (w) {
query += query
? '&w='
: 'w=' + _.floor(_.multiply(dpi * w))
}
if (h) {
query += query
? '&h='
: 'h=' + _.floor(_.multiply(dpi * h))
}
for (const key in others) {
query += `${query ? '&' : ''}${key}=${options[key]}`
}
if (!url) return ''
if (/((http|https):)?\/\/([^/]+)/i.test(url)) {
return url
} else if (url.indexOf('/') === -1) {
return imagePath + url + (query ? '?' : '') + query
} else {
return filePath + url
}
}
router.afterEach((to, from) => { router.afterEach((to, from) => {
if (to.path === '/login') return if (to.path === '/login') return
store.commit('tags/add', { store.commit('tags/add', {
......
function getStaticPath() {
if (!/(http|https):\/\/([^/]+)/i.test(window.apiHostSetting.VUE_APP_BASE_URL)) {
return location.origin + window.apiHostSetting.VUE_APP_BASE_URL
}
return window.apiHostSetting.VUE_APP_BASE_URL
}
// zimg图片服务器地址
export const zImgPath = window.apiHostSetting.VUE_APP_ZIMG_URL
// 文件存储路径地址
export const filePath = getStaticPath() + 'upload/erp'
export function delChildren(list, callback, name) {
const key = name || 'children'
function recursive(list, callback, index) {
for (const iterator of list) {
callback && callback(iterator, index)
if (iterator.children.length > 0) {
recursive(iterator.children, callback, index + 1)
} else {
delete iterator[key]
}
}
}
recursive(list, callback, 0)
return list
}
\ No newline at end of file
...@@ -115,6 +115,14 @@ ...@@ -115,6 +115,14 @@
查询 查询
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="statusCode === 'PRE_HANDLING'">
<el-button
type="success"
size="mini"
@click="addData"
>新增</el-button
>
</el-form-item>
</el-form> </el-form>
<div class="table-wrap" v-loading="loading"> <div class="table-wrap" v-loading="loading">
<table-view <table-view
...@@ -145,8 +153,8 @@ ...@@ -145,8 +153,8 @@
width="900px" width="900px"
@close="getlist()" @close="getlist()"
> >
<div class="step-bar"> <!-- <div class="step-bar">
<!-- step-pass 已经完成,step-active当前步骤 --> step-pass 已经完成,step-active当前步骤
<div <div
class="step step-after" class="step step-after"
:class="{ :class="{
...@@ -194,7 +202,7 @@ ...@@ -194,7 +202,7 @@
> >
<span>已归档</span> <span>已归档</span>
</div> </div>
</div> </div> -->
<div class="content" v-loading="detailLoading"> <div class="content" v-loading="detailLoading">
<div class="detail_list"> <div class="detail_list">
<div class="item_wrap"> <div class="item_wrap">
...@@ -328,7 +336,14 @@ ...@@ -328,7 +336,14 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<edit
:editDialog.sync="editDialog"
@onSubmit="onSubmit"
@onChangeModule="onChangeModule"
:editForm="editForm"
:orderTypes="orderTypes"
:isEdit="isEdit"
ref="edit"></edit>
<!-- 指派 --> <!-- 指派 -->
<el-dialog <el-dialog
title="指派给" title="指派给"
...@@ -369,6 +384,7 @@ ...@@ -369,6 +384,7 @@
import tableView from '@/common/components/base/tableView.vue' import tableView from '@/common/components/base/tableView.vue'
import ChooseTimePeriod from '../../components/base/chooseTimePeriod.vue' import ChooseTimePeriod from '../../components/base/chooseTimePeriod.vue'
import pagination from '../../mixins/pagination' import pagination from '../../mixins/pagination'
import Edit from './edit.vue'
import axios from '../../common/api/axios' import axios from '../../common/api/axios'
import { import {
getOrderTree, getOrderTree,
...@@ -394,6 +410,7 @@ export default { ...@@ -394,6 +410,7 @@ export default {
components: { components: {
ChooseTimePeriod, ChooseTimePeriod,
tableView, tableView,
Edit,
}, },
data() { data() {
const userInfo = localStorage.getItem('userinfo') const userInfo = localStorage.getItem('userinfo')
...@@ -418,7 +435,7 @@ export default { ...@@ -418,7 +435,7 @@ export default {
selections: [], selections: [],
is_tab: '1', is_tab: '1',
statusCode: 'PRE_HANDLING', statusCode: 'PRE_HANDLING',
searchForm: { timeProp: 'create_time', sign: 1 }, searchForm: { timeProp: 'create_time' },
isEdit: false, isEdit: false,
sourceData: [], sourceData: [],
currentRowId: '', currentRowId: '',
...@@ -436,6 +453,8 @@ export default { ...@@ -436,6 +453,8 @@ export default {
userList: [], userList: [],
orderTypes: [], orderTypes: [],
chatRecord: [], chatRecord: [],
cloneForm: {},
editDialog: false,
} }
}, },
mounted() { mounted() {
...@@ -443,6 +462,9 @@ export default { ...@@ -443,6 +462,9 @@ export default {
this.getlist() this.getlist()
this.getSystemUserList() this.getSystemUserList()
this.getOrderTypes() this.getOrderTypes()
this.cloneForm = JSON.parse(
JSON.stringify(this.editForm),
)
}, },
computed: { computed: {
...mapState(['deptStaff']), ...mapState(['deptStaff']),
...@@ -459,13 +481,21 @@ export default { ...@@ -459,13 +481,21 @@ export default {
<span>{item.title}</span> <span>{item.title}</span>
{item.sign === 1 && {item.sign === 1 &&
item.orderStatus === 'PRE_HANDLING' && ( item.orderStatus === 'PRE_HANDLING' && (
<i class="el-icon-info" title="待回复"></i> <i
class="el-icon-info"
title="待回复"
></i>
)} )}
</span> </span>
), ),
}, },
{ label: '工单编号', key: 'orderNo', width: 110 }, { label: '工单编号', key: 'orderNo', width: 110 },
{ label: '工单模块', key: 'moduleName', width: 110, align: 'left' }, {
label: '工单模块',
key: 'moduleName',
width: 110,
align: 'left',
},
{ {
label: '工单类型', label: '工单类型',
key: 'orderTypeTxt', key: 'orderTypeTxt',
...@@ -495,8 +525,16 @@ export default { ...@@ -495,8 +525,16 @@ export default {
key: 'createTime', key: 'createTime',
width: 130, width: 130,
}, },
{ label: '期望完成时间', key: 'expectCompleteTime', width: 130 }, {
{ label: '完成时间', key: 'completeTime', width: 130 }, label: '期望完成时间',
key: 'expectCompleteTime',
width: 130,
},
{
label: '完成时间',
key: 'completeTime',
width: 130,
},
{ {
label: '操作', label: '操作',
fixed: 'right', fixed: 'right',
...@@ -505,7 +543,7 @@ export default { ...@@ -505,7 +543,7 @@ export default {
render: (item) => ( render: (item) => (
<span> <span>
{(item.orderStatus === 'PRE_HANDLING' || {(item.orderStatus === 'PRE_HANDLING' ||
item.orderStatus === 'IN_PROGRESS') && ( item.orderStatus === 'IN_COMPLETE') && (
<span <span
title="详情" title="详情"
class="icon-view icon-tools-view" class="icon-view icon-tools-view"
...@@ -550,7 +588,12 @@ export default { ...@@ -550,7 +588,12 @@ export default {
)} )}
{item.orderStatus === 'IN_PROGRESS' && ( {item.orderStatus === 'IN_PROGRESS' && (
<span title="完成" class="icon-view"> <span title="完成" class="icon-view">
<img width="24" height="24" src={completeWork} onClick={() => this.complete(item)}/> <img
width="24"
height="24"
src={completeWork}
onClick={() => this.complete(item)}
/>
</span> </span>
)} )}
</span> </span>
...@@ -560,6 +603,24 @@ export default { ...@@ -560,6 +603,24 @@ export default {
}, },
}, },
methods: { methods: {
addData() {
this.editForm = JSON.parse(
JSON.stringify(this.cloneForm),
)
this.isEdit = false
// this.editForm = { taskAcceptanceUser: this.employeeId }
this.editDialog = true
this.$refs.editForm &&
this.$refs.editForm.resetFields()
},
onChangeModule(item) {
this.$set(this.editForm, 'moduleName', item.name)
},
onSubmit() {
this.editDialog = false
this.getlist()
this.getOrderTree()
},
cellClassName({ row, columnIndex }) { cellClassName({ row, columnIndex }) {
if ( if (
(row.orderStatus === 'TO_BE_ASSIGN' || (row.orderStatus === 'TO_BE_ASSIGN' ||
...@@ -931,10 +992,10 @@ export default { ...@@ -931,10 +992,10 @@ export default {
.detail_list .item .value { .detail_list .item .value {
color: #222; color: #222;
} }
.form_item >>> .el-radio { .form_item::v-deep .el-radio {
margin-right: 13px; margin-right: 13px;
} }
.form_item >>> .el-radio svg { .form_item::v-deep .el-radio svg {
vertical-align: text-bottom; vertical-align: text-bottom;
} }
.detail_btn { .detail_btn {
......
...@@ -4,5 +4,32 @@ module.exports = defineConfig({ ...@@ -4,5 +4,32 @@ module.exports = defineConfig({
devServer: { devServer: {
port: 8082, port: 8082,
host: '', host: '',
proxy: {
'/api/': {
target: 'http://192.168.31.244',
headers: {
Host: 'local.local.cn',
Origin: 'http://local.local.cn/',
},
},
'/erpimg/': {
target: 'http://192.168.31.99:4869',
pathRewrite: {
'^/erpimg/': '',
},
headers: {
Host: 'local.local.cn',
Origin: 'http://local.local.cn/',
},
},
'/ws/': {
target: 'http://192.168.31.244',
headers: {
Host: 'local.local.cn',
Origin: 'http://local.local.cn/',
},
ws: true,
},
},
}, },
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment