Commit 40f9e02f by qinjianhui

feat: 添加新增

parent 767df67c
......@@ -6025,8 +6025,7 @@
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash.camelcase": {
"version": "4.3.0",
......
......@@ -18,7 +18,8 @@
"vue-router": "^3.5.1",
"vuex": "^3.6.2",
"vxe-table": "^3.5.9",
"xe-utils": "^3.5.7"
"xe-utils": "^3.5.7",
"lodash": "~4.17.20"
},
"devDependencies": {
"@babel/core": "^7.12.16",
......
window.apiHostSetting = {
VUE_APP_API_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 = {}) {
for (const key in otherParams) {
from.append(key, otherParams[key])
}
return axios.post(url || 'upload/fileUpload/images', from, {
headers: { 'content-type': 'multipart/form-data' },
})
return axios.post(url || 'platform/upload/fileUpload/images', from)
}
\ No newline at end of file
......@@ -132,7 +132,7 @@ export default {
}
</script>
<style scoped>
.editor_toolbar >>> .panel_menu li:hover {
.editor_toolbar::v-deep .panel_menu li:hover {
background: #efefef;
}
</style>
......@@ -6,6 +6,9 @@ import element from '@/common/components/element-ui.js'
import vxeTable from '@/common/components/vxeTable.js'
import './common/style/index.scss'
import Directives from './utils/directives'
import { filePath, zImgPath } from './utils/commonUtil'
import md5 from 'js-md5'
import _ from 'lodash'
// import { getToken } from '@/utils/auth'
Vue.config.productionTip = false
......@@ -14,6 +17,48 @@ Vue.use(Directives)
Vue.use(element)
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) => {
if (to.path === '/login') return
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 @@
查询
</el-button>
</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>
<div class="table-wrap" v-loading="loading">
<table-view
......@@ -145,8 +153,8 @@
width="900px"
@close="getlist()"
>
<div class="step-bar">
<!-- step-pass 已经完成,step-active当前步骤 -->
<!-- <div class="step-bar">
step-pass 已经完成,step-active当前步骤
<div
class="step step-after"
:class="{
......@@ -194,7 +202,7 @@
>
<span>已归档</span>
</div>
</div>
</div> -->
<div class="content" v-loading="detailLoading">
<div class="detail_list">
<div class="item_wrap">
......@@ -328,7 +336,14 @@
</div>
</div>
</el-dialog>
<edit
:editDialog.sync="editDialog"
@onSubmit="onSubmit"
@onChangeModule="onChangeModule"
:editForm="editForm"
:orderTypes="orderTypes"
:isEdit="isEdit"
ref="edit"></edit>
<!-- 指派 -->
<el-dialog
title="指派给"
......@@ -369,6 +384,7 @@
import tableView from '@/common/components/base/tableView.vue'
import ChooseTimePeriod from '../../components/base/chooseTimePeriod.vue'
import pagination from '../../mixins/pagination'
import Edit from './edit.vue'
import axios from '../../common/api/axios'
import {
getOrderTree,
......@@ -394,6 +410,7 @@ export default {
components: {
ChooseTimePeriod,
tableView,
Edit,
},
data() {
const userInfo = localStorage.getItem('userinfo')
......@@ -418,7 +435,7 @@ export default {
selections: [],
is_tab: '1',
statusCode: 'PRE_HANDLING',
searchForm: { timeProp: 'create_time', sign: 1 },
searchForm: { timeProp: 'create_time' },
isEdit: false,
sourceData: [],
currentRowId: '',
......@@ -436,6 +453,8 @@ export default {
userList: [],
orderTypes: [],
chatRecord: [],
cloneForm: {},
editDialog: false,
}
},
mounted() {
......@@ -443,6 +462,9 @@ export default {
this.getlist()
this.getSystemUserList()
this.getOrderTypes()
this.cloneForm = JSON.parse(
JSON.stringify(this.editForm),
)
},
computed: {
...mapState(['deptStaff']),
......@@ -459,13 +481,21 @@ export default {
<span>{item.title}</span>
{item.sign === 1 &&
item.orderStatus === 'PRE_HANDLING' && (
<i class="el-icon-info" title="待回复"></i>
<i
class="el-icon-info"
title="待回复"
></i>
)}
</span>
),
},
{ label: '工单编号', key: 'orderNo', width: 110 },
{ label: '工单模块', key: 'moduleName', width: 110, align: 'left' },
{
label: '工单模块',
key: 'moduleName',
width: 110,
align: 'left',
},
{
label: '工单类型',
key: 'orderTypeTxt',
......@@ -495,8 +525,16 @@ export default {
key: 'createTime',
width: 130,
},
{ label: '期望完成时间', key: 'expectCompleteTime', width: 130 },
{ label: '完成时间', key: 'completeTime', width: 130 },
{
label: '期望完成时间',
key: 'expectCompleteTime',
width: 130,
},
{
label: '完成时间',
key: 'completeTime',
width: 130,
},
{
label: '操作',
fixed: 'right',
......@@ -505,7 +543,7 @@ export default {
render: (item) => (
<span>
{(item.orderStatus === 'PRE_HANDLING' ||
item.orderStatus === 'IN_PROGRESS') && (
item.orderStatus === 'IN_COMPLETE') && (
<span
title="详情"
class="icon-view icon-tools-view"
......@@ -550,7 +588,12 @@ export default {
)}
{item.orderStatus === 'IN_PROGRESS' && (
<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>
......@@ -560,6 +603,24 @@ export default {
},
},
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 }) {
if (
(row.orderStatus === 'TO_BE_ASSIGN' ||
......@@ -931,10 +992,10 @@ export default {
.detail_list .item .value {
color: #222;
}
.form_item >>> .el-radio {
.form_item::v-deep .el-radio {
margin-right: 13px;
}
.form_item >>> .el-radio svg {
.form_item::v-deep .el-radio svg {
vertical-align: text-bottom;
}
.detail_btn {
......
......@@ -4,5 +4,32 @@ module.exports = defineConfig({
devServer: {
port: 8082,
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