Commit 4969e6d2 by linjinhong

Merge remote-tracking branch 'origin/ljh-sass' into dev

parents 91647a88 5dcc3bcd
......@@ -17,7 +17,7 @@ export default {
},
formLabelWidth: {
type: String,
default: '50px'
default: null
},
formItemWidth: {
type: String,
......@@ -95,7 +95,7 @@ export default {
}
},
created() {
// console.log(104, this.formData)
console.log(104, this.formLabelWidth)
},
render() {
return (
......@@ -139,12 +139,17 @@ export default {
{item.type === 'select' && (
<el-select
v-model={this.formData[item.prop]}
{...{ attrs: item.attrs }}
onChange={(e) =>
item.events && item.events.onChange(this.formData, e)
}
placeholder={item.placeholder || `请选择${item.name}`}
value-key={item.valueKey || 'value'}
clearable>
{item.options?.map((el, idx) => (
<el-option
label={el.label}
value={el.value}
value={item.valueKey ? el : el.value}
key={idx}></el-option>
))}
</el-select>
......@@ -156,11 +161,13 @@ export default {
placeholder="选择日期"
v-model={this.formData[item.prop]}
clearable
{...{ attrs: item.attrs }}
style="width: 100%;"></el-date-picker>
)}
{item.type === 'radio' &&
item.radioOptions?.map((el, idx) => (
<el-radio
{...{ attrs: item.attrs }}
v-model={this.formData[item.prop]}
label={el.value}
key={idx}>
......@@ -170,7 +177,7 @@ export default {
</el-form-item>
))}
{this.isCustomButton && (
<el-form-item>
<el-form-item style="margin-right:5px">
<el-button
type="primary"
onClick={this.search}
......@@ -182,7 +189,9 @@ export default {
</el-button>
</el-form-item>
)}
{!this.isCustomButton && <slot name="btn"></slot>}
{this.$slots.btn && (
<el-form-item> {this.$scopedSlots.btn()} </el-form-item>
)}
</el-form>
)
}
......
......@@ -23,13 +23,9 @@ Vue.use(element)
Vue.use(vxeTable)
const clientWidth = document.body.clientWidth
const dpi = _.add(
_.ceil(_.divide(clientWidth / 1920)) + 0.5,
)
const dpi = _.add(_.ceil(_.divide(clientWidth / 1920)) + 0.5)
let imagePath = ''
if (
md5(location.host) === '42f2b26039d7fd526b8a1d50bb329cbc'
) {
if (md5(location.host) === '42f2b26039d7fd526b8a1d50bb329cbc') {
localStorage.setItem('locationHost', location.host)
imagePath = zImgPath
} else if (zImgPath.indexOf('/erpimg') !== -1) {
......@@ -41,14 +37,10 @@ Vue.prototype.setimgUrl = (url, options = {}) => {
const { w, h, ...others } = options
let query = ''
if (w) {
query += query
? '&w='
: 'w=' + _.floor(_.multiply(dpi * w))
query += query ? '&w=' : 'w=' + _.floor(_.multiply(dpi * w))
}
if (h) {
query += query
? '&h='
: 'h=' + _.floor(_.multiply(dpi * h))
query += query ? '&h=' : 'h=' + _.floor(_.multiply(dpi * h))
}
for (const key in others) {
query += `${query ? '&' : ''}${key}=${options[key]}`
......@@ -70,6 +62,7 @@ router.afterEach((to, from) => {
name: to.name,
path: to.fullPath,
title: to.meta?.title || to.name,
meta: to.meta
})
store.commit('tags/setActive', to.name)
})
......@@ -87,5 +80,5 @@ router.beforeEach((to, form, next) => {
new Vue({
router,
store,
render: (h) => h(App),
render: (h) => h(App)
}).$mount('#app')
......@@ -85,6 +85,12 @@ const routes = [
meta: { title: '安全设置中心' }
},
{
path: '/saas/erpManagementList',
component: () => import('@/views/system/erpManagementList.vue'),
name: 'erpManagementList',
meta: { title: 'ERP启动列表' }
},
{
path: '/saas/countryCode',
component: () => import('@/views/system/countryCode.vue'),
name: 'system_countryCode',
......@@ -102,6 +108,7 @@ const routes = [
name: 'system_management',
meta: { title: '客户管理' }
},
{
path: '/saas/user/recharge-record',
component: () => import('@/views/user/rechargeRecord.vue'),
......@@ -157,6 +164,12 @@ const routes = [
meta: { title: '异常消息' }
},
{
path: '/operation/asynchronousTask',
component: () => import('@/views/operation/asynchronousTask.vue'),
name: 'asynchronousTask',
meta: { title: '异步任务' }
},
{
path: '/saas/production/assistant/manage',
component: () => import('@/views/production/AssistantManage.vue'),
name: 'production_assistant_manage',
......
......@@ -22,18 +22,29 @@ export default {
name: 'HomeView',
components: {
NavMenu,
HomeHeader,
HomeHeader
},
computed: {
...mapState('tags', ['tags']),
cacheView() {
// 在router中meta.keepAlive设置为true才能开启缓存
const arr = []
return arr.concat(this.tags.map((item) => item.name))
},
return arr.concat(
this.tags
.map((item) => {
if (item.meta && item.meta.keepAlive) {
return item.name
}
return null
})
.filter((el) => el !== null)
)
}
},
data() {
return {}
},
}
}
</script>
<style lang="scss" scoped>
......
......@@ -119,7 +119,7 @@
:disabled="editForm.database.includes('all')"
v-for="it in dataBase"
:key="it"
:label="`${it.databaseName}(${it.dataHost})`"
:label="`${it.databaseName}`"
:value="it.id"></el-option>
</el-select>
</el-form-item>
......@@ -336,6 +336,14 @@ export default {
children: []
},
{
id: 6_2,
path: '',
label: '异步任务',
icon: 'el-icon-postcard',
index: '/operation/asynchronousTask',
children: []
},
{
id: 9,
path: '',
label: 'sql执行工具',
......
<template>
<div class="recharge-record card">
<div class="search">
<CustomForm
:formConfig="queryformConfig"
v-model="queryFormData"
:isCustomButton="false"
:isFlex="false">
<template slot="btn">
<el-button type="primary" icon="el-icon-search" @click="search">
查询
</el-button>
</template>
</CustomForm>
</div>
<div class="table_wrap" v-loading="loading">
<table-vue
:sourceData="sourceData"
ref="multipleTable"
:tableColumns="usersTableColumns"></table-vue>
</div>
<div class="pagination">
<el-pagination
layout="sizes, total, prev, pager, next, jumper"
background
:total="paginationOptions.total"
:page-size="paginationOptions.pageSize"
:current-page="paginationOptions.currentPage"
@size-change="sizeChange"
@current-change="onCurrentChange"></el-pagination>
</div>
</div>
</template>
<script>
import axios from '../../common/api/axios'
import CustomForm from '@/common/components/base/CustomForm.vue'
import { mapState } from 'vuex'
import tableVue from '@/common/components/base/tableView.vue'
export default {
name: 'asynchronousTask',
components: {
tableVue,
CustomForm
},
data() {
return {
is_title: 1,
ishowForm: false,
select: '',
sourceData: [],
serviceNameList: { sysService: '系统服务同步' },
formData: {},
queryFormData: {},
queryformConfig: [
{
prop: 'timeRange',
type: 'datePicker',
dateType: 'datetimerange',
name: ' 提交时间',
attrs: {
'start-placeholder': '开始时间',
'end-placeholder': '结束时间',
'value-format': 'yyyy-MM-dd HH:mm:ss',
'default-time': ['00:00:00', '23:59:59']
}
},
{
prop: 'runStatus',
type: 'select',
name: '状态',
options: [
{ label: '进行中', value: 0 },
{ label: '完成', value: 1 },
{ label: '失败', value: 2 }
]
}
],
dialogVisible: false,
formId: null,
paginationOptions: {
pageSize: 100,
currentPage: 1,
total: 0
},
details: [],
loading: false
}
},
async created() {
// await this.getServiceNameList()
this.getList()
},
computed: {
...mapState(['reqMenu', 'employee']),
usersTableColumns() {
return [
{
label: '任务类型',
key: 'taskType',
render: (item) => <span>{this.serviceNameList[item.taskType]}</span>
},
{
label: '任务标题',
key: 'taskTitle',
width: ''
},
{
label: '异常信息',
key: 'exceptionMsg',
width: ''
},
{
label: '状态',
key: 'runStatus',
width: '',
render: (item) => (
<span class={['text', this.getColor(item.runStatus)]}>
{item.runStatus === 0
? '进行中'
: item.runStatus === 1
? '完成'
: '失败'}
</span>
)
},
{
label: '操作人',
key: 'operatorName',
width: '100'
},
{
label: '提交时间',
key: 'submitTime',
width: ''
},
{
label: '开始时间',
key: 'startTime',
width: ''
},
{
label: '结束时间',
key: 'endTime',
width: '100'
},
{
label: '相关操作',
key: '',
fixed: 'right',
width: '130',
render: (item) =>
(item.runStatus !== 1 && (
<div>
<span
title="重新发送"
class="icon-view resendMsg"
onClick={() => this.resendMsg(item.id)}>
<i class="el-icon-s-promotion"></i>
</span>
</div>
)) ||
''
}
]
}
},
methods: {
sizeChange(value) {
this.paginationOptions.pageSize = value
this.getList()
},
onCurrentChange(value) {
this.paginationOptions.currentPage = value
this.getList()
},
selectionChange(selection) {
if (selection.length > 0) {
this.select = selection
}
},
search() {
if (this.queryFormData.timeRange && this.queryFormData.timeRange.length) {
this.queryFormData.minSubmitTime = this.queryFormData.timeRange[0]
this.queryFormData.maxSubmitTime = this.queryFormData.timeRange[1]
}
this.getList()
},
// 查询
getList() {
this.loading = true
const { pageSize, currentPage } = this.paginationOptions
axios
.post('sys/syncTaskLog/list_page ', {
pageSize,
currentPage,
...this.queryFormData
})
.then((res) => {
if (res.code === 200) {
this.sourceData = res.data.records
this.paginationOptions.total = res.data.total
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true
})
}
this.loading = false
})
},
async resendMsg(id) {
const params = { id }
try {
this.$confirm('确认发送?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
await axios.get('sys/syncTaskLog/retry_send', { params })
this.$message.success('发送成功')
this.getList()
})
.catch(() => {
this.$message.warning('取消发送')
})
} catch (error) {
console.log(error)
this.$message.warning(error.message)
} finally {
this.loading = false
}
},
getColor(status) {
if (status === 0) {
return 'afootStatus'
} else if (status === 1) {
return 'successStatus'
} else {
return 'failStatus'
}
}
}
}
</script>
<style scoped lang="less">
.wraper {
display: flex;
flex-direction: column;
height: 100%;
}
.table_wrap {
flex: 1;
padding: 0;
}
.circle {
display: inline-block;
height: 10px;
width: 10px;
border-radius: 5px;
margin-right: 5px;
}
.my-table .first {
background-color: red !important;
color: #fff !important;
}
::v-deep.switchStyle .el-switch__label {
position: absolute;
display: none;
color: #fff;
span {
font-size: 12px !important;
}
}
.el-switch__core {
background-color: rgba(166, 166, 166, 1);
}
::v-deep.switchStyle .el-switch__label--left {
z-index: 9;
left: 20px;
}
::v-deep.switchStyle .el-switch__label--right {
z-index: 9;
right: 20px;
}
::v-deep.switchStyle .el-switch__label.is-active {
display: block;
}
::v-deep.switchStyle.el-switch .el-switch__core,
.el-switch .el-switch__label {
width: 50px !important;
}
.resendMsg {
background-color: #ff9900;
&:hover {
background-color: #ffd36a;
}
}
.text {
color: #fff;
border-radius: 4px;
padding: 1px 5px;
}
.afootStatus {
background-color: #409eff;
}
.successStatus {
background-color: #67c23a;
}
.failStatus {
background-color: #f56c6c;
}
.recharge-record {
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
&::v-deep {
.el-table .el-table__cell {
padding: 6px 0;
}
.el-input__inner {
padding: 0 4px;
}
.el-input--small .el-input__inner {
height: 30px;
line-height: 30px;
}
.el-icon-time:before {
content: '';
}
.el-dialog__footer {
text-align: center;
.el-button--small {
padding: 9px 50px;
}
}
.el-dialog__body {
padding: 10px 20px;
}
.el-icon-edit:before {
color: #ff9800;
font-weight: bold;
}
.el-range-editor--small .el-range-separator {
line-height: 31px;
}
.header-row-class-name th {
background-color: #f8f8f9;
}
.el-input-group__append {
padding-left: 0;
}
}
}
</style>
......@@ -139,6 +139,10 @@ export default {
key: 'statusStr'
},
{
label: '异常信息',
key: 'errorMsg'
},
{
label: '创建时间',
key: 'createTime'
},
......
......@@ -80,11 +80,14 @@
<el-switch v-model="editForm.priority"></el-switch>
</el-form-item>
</el-form>
<v-editor
filename="files"
v-model="editForm.content"
ref="wangeditor"
height="300px" />
<div v-if="dialogVisible">
<v-editor
filename="files"
v-model="editForm.content"
ref="wangeditor"
height="300px" />
</div>
<div slot="footer">
<el-button @click="dialogVisible = false" size="mini">取 消</el-button>
<el-button type="primary" @click="submit" size="mini">确 定</el-button>
......
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
port: 8082,
host: '',
proxy: {
'/api': {
target: 'http://10.168.31.222:8096',
changeOrigin: true
// pathRewrite: {
// '^/api': '',
// },
}
}
}
// devServer: {
// port: 8082,
// host: '',
// }
})
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