Commit f2c8e21a by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !25
parents 40da5110 8daebed0
...@@ -24,6 +24,8 @@ import { ...@@ -24,6 +24,8 @@ import {
MenuItemGroup, MenuItemGroup,
Tag, Tag,
Checkbox, Checkbox,
Tabs,
TabPane,
Tree, Tree,
Dropdown, Dropdown,
DropdownItem, DropdownItem,
...@@ -50,6 +52,8 @@ const components = [ ...@@ -50,6 +52,8 @@ const components = [
MenuItem, MenuItem,
Submenu, Submenu,
MenuItemGroup, MenuItemGroup,
Tabs,
TabPane,
Tag, Tag,
Checkbox, Checkbox,
Tree, Tree,
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
], ],
}, },
paginationOptions: { paginationOptions: {
pageSize: 100, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
......
...@@ -187,14 +187,14 @@ export default { ...@@ -187,14 +187,14 @@ export default {
index: '/saas/currency', index: '/saas/currency',
children: [], children: [],
}, },
// { {
// id: 4, id: 4,
// path: '', path: '',
// label: '定时任务', label: '定时任务',
// icon: 'el-icon-message-solid', icon: 'el-icon-message-solid',
// index: '/saas/timed_task', index: '/saas/timed_task',
// children: [], children: [],
// }, },
], ],
}, },
], ],
......
<template>
<div class="wraper">
<el-form
:inline="true"
size="mini"
@submit.native.prevent
@keyup.enter.capture="search"
>
<el-form-item label="类型">
<el-select
style="width: 150px"
v-model="searchForm.taskType"
value-key=""
placeholder="请选择"
clearable
>
<el-option
v-for="(item, index) in types"
:key="index"
:label="item.value"
:value="item.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
native-type="submit"
type="primary"
@click="search()"
icon="el-icon-search"
>
查询
</el-button>
</el-form-item>
<el-form-item>
<el-button
type="success"
@click="addDialog(1)"
icon="el-icon-plus"
>新增</el-button
>
</el-form-item>
</el-form>
<div
v-loading="loading"
class="table-wrap"
style="height:460px"
>
<table-vue
:sourceData="sourceData"
ref="multipleTable"
:tableColumns="tableColumns"
@currentChange="currentTabFn"
:rowClassName="cellClass"
:selection="true"
@selectionChange="selectionChange"
></table-vue>
</div>
<el-tabs v-model="activeName">
<el-tab-pane label="日志" name="1">
<div class="table-wrap" style="height:280px">
<table-vue
:sourceData="sourceData"
ref="multipleTable"
:tableColumns="tableColumns"
@currentChange="currentTabFn"
:rowClassName="cellClass"
@selectionChange="selectionChange"
></table-vue>
<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>
</el-tab-pane>
</el-tabs>
<!-- 弹出层 -->
<el-dialog
:close-on-click-modal="false"
:title="is_title == 1 ? '新增' : '编辑'"
:visible.sync="dialogVisible"
width="800px"
>
<el-form
label-position="right"
label-width="140px"
size="mini"
:inline="true"
:model="addcurrencyform"
:rules="addrules"
ref="addcurrencyform"
>
<el-form-item label="币种代码" prop="currencyCode">
<el-input
v-model="addcurrencyform.currencyCode"
placeholder="请输入币种代码"
></el-input>
</el-form-item>
<el-form-item label="币种名称" prop="currencyName">
<el-input
v-model="addcurrencyform.currencyName"
placeholder="请输入币种名称"
></el-input>
</el-form-item>
<el-form-item
label="对人人民币汇率"
prop="exchangeCnyRate"
>
<el-input
v-model="addcurrencyform.exchangeCnyRate"
placeholder="对人人民币汇率"
></el-input>
</el-form-item>
<el-form-item
label="对美元汇率"
prop="exchangeUsdRate"
>
<el-input
v-model="addcurrencyform.exchangeUsdRate"
placeholder="对美元汇率"
></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="addcurrencyform.remark"
placeholder="请输入备注"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button
@click="dialogVisible = false"
size="mini"
style="width: 100px"
>
取消
</el-button>
<el-button
type="primary"
@click="addCurrency()"
size="mini"
style="width: 100px"
>
确认
</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import axios from '../../common/api/axios'
import tableVue from '@/common/components/base/tableView.vue'
export default {
name: 'system_timed_task',
components: {
tableVue,
},
data() {
return {
activeName: '1',
is_title: 1,
select: '',
types: [],
sourceData: [],
searchForm: {},
dialogVisible: false,
addcurrencyform: {
id: '',
currencyCode: '',
currencyName: '',
exchangeUsdRate: '',
exchangeCnyRate: '',
remark: '',
},
addcurrencyform2: null,
formId: null,
addrules: {
exchangeUsdRate: [
{
required: true,
message: '请输入汇率',
trigger: 'blur',
},
{
pattern: /^(\d+)?(\.\d+)?$/,
message: '只能输入数字',
},
],
exchangeCnyRate: [
{
required: true,
message: '请输入汇率',
trigger: 'blur',
},
{
pattern: /^(\d+)?(\.\d+)?$/,
message: '只能输入数字',
},
],
currencyCode: [
{
required: true,
message: '请输入币种代码',
trigger: 'blur',
},
],
currencyName: [
{
required: true,
message: '请输入币种名称',
trigger: 'blur',
},
],
},
paginationOptions: {
pageSize: 100,
currentPage: 1,
total: 0,
},
loading: false,
}
},
created() {
this.getList()
this.addcurrencyform2 = JSON.parse(
JSON.stringify(this.addcurrencyform),
)
},
mounted() {
axios.get('quartzTask/typeList').then(res => {
this.types = res.data
})
},
computed: {
tableColumns() {
return [
{
label: '任务类型',
type: '',
width: 200,
key: 'taskTypeTxt',
align: 'left',
},
{
label: '分组',
type: '',
width: 100,
key: 'taskGroup',
},
{
label: '定时器类型',
type: '',
width: 100,
key: 'quartzType',
},
{ label: 'cron', type: '', width: '', key: 'cron' },
{
label: '开始时间',
type: '',
width: 130,
key: 'startTime',
},
{
label: '间隔',
type: '',
width: 100,
key: 'interval',
align: 'right',
},
{
label: '单位',
type: '',
width: 100,
key: 'unitTxt',
},
{
label: '状态',
type: '',
width: 60,
key: 'status',
render: item => (
<el-switch
value={item.status}
active-value={true}
inactive-value={false}
onChange={status =>
this.statusChange(item, status)
}
/>
),
},
{
label: '任务描述',
type: '',
width: '',
key: 'note',
align: 'left',
},
{
label: '创建时间',
type: '',
width: 130,
key: 'createTime',
},
{
label: '操作',
type: '',
width: 100,
fixed: 'right',
key: '',
render: item => (
<div>
<span
class="icon-view icon-edit-view"
title="编辑"
>
<i
class="el-icon-edit"
onClick={() => this.addDialog(item)}
></i>
</span>
<span
class="icon-view icon-del-view"
title="删除"
>
<i
class="el-icon-delete-solid"
onClick={() =>
this.deleteSection(item.id)
}
></i>
</span>
<span
onClick={() => this.clearLog(item.id)}
class="icon-view icon-tools-view"
title="清空日志"
>
<svg
t="1627348192624"
style="margin-top:3px"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="1348"
width="18"
height="18"
>
<path
d="M274.688 811.52c-8.32 10.688-20.48 24-36.48 39.936a44.736 44.736 0 0 1-43.136 11.52l-78.08-20.864-23.104-8.704c-29.632-25.536-44.608-61.44-39.36-95.552 5.76-37.12 32.32-67.648 82.112-88.704 34.368-14.656 67.584-74.176 89.664-157.44l3.84-14.464-2.24-4.032-14.272-4.48c-17.856-5.504-30.08-16.96-34.432-31.808-4.352-14.912-0.064-30.72 12.096-43.904l123.776-135.488c9.92-10.752 24.832-19.392 41.856-23.936 16.64-4.416 33.984-4.672 48.64-0.768l123.584 33.024 4.096-2.368 55.36-205.824c8.704-32.448 43.968-51.456 78.72-42.24l83.2 22.272c34.752 9.28 55.808 43.392 47.104 75.84l-55.36 205.824 2.368 4.096 118.528 31.68c14.592 3.84 29.568 12.8 41.728 24.96 12.416 12.352 21.12 27.2 24.192 41.472l39.36 179.072c3.84 17.536-0.384 33.28-11.648 44.032a43.776 43.776 0 0 1-25.92 11.712l-12.928 1.408-2.944 3.072-1.024 12.864c-2.56 34.048-6.4 62.976-17.92 139.52l-6.528 43.648c-3.84 26.048-6.528 46.976-8.768 66.304-4.224 36.544-23.488 65.28-54.656 81.6-15.424 8.128-32 12.672-45.824 13.44l-4.032 0.192-90.432-24.32a18.88 18.88 0 0 1-12.16-26.688l35.392-71.552-20.352 26.24a515.328 515.328 0 0 1-47.36 50.56 19.008 19.008 0 0 1-18.112 4.672l-75.456-20.16a18.88 18.88 0 0 1-12.16-26.624l35.456-71.552-20.352 26.24a510.336 510.336 0 0 1-47.36 50.56 18.944 18.944 0 0 1-18.112 4.672l-88.448-23.68a18.944 18.944 0 0 1-12.096-26.56l35.392-71.552-20.352 26.24a515.84 515.84 0 0 1-47.36 50.56 18.944 18.944 0 0 1-18.112 4.672l-62.528-16.704a18.944 18.944 0 0 1-12.096-26.688l35.392-71.488-20.352 26.24z m577.024-413.824l-142.784-38.208a22.272 22.272 0 0 1-15.808-27.264l61.056-227.072a22.272 22.272 0 0 0-15.808-27.264L657.728 56.32a22.4 22.4 0 0 0-27.328 15.744l-60.992 227.136a22.336 22.336 0 0 1-27.392 15.744l-147.84-39.552c-14.848-3.968-37.248 1.728-46.464 11.84l-113.92 124.544a11.072 11.072 0 0 0 5.376 18.24l669.184 178.816a11.136 11.136 0 0 0 13.824-13.12l-36.16-164.608-34.304-33.408zM317.44 709.76a22.4 22.4 0 0 1 27.328-6.848l3.392 1.6h0.128a21.888 21.888 0 0 1 10.432 29.248c-15.616 32.896-27.136 56.32-34.432 70.4-3.584 6.912-7.232 13.696-10.88 20.48l-11.648 21.12 34.176 9.152 2.944-0.64 6.208-4.928c29.504-23.68 61.888-59.136 97.088-106.176a22.4 22.4 0 0 1 27.264-6.848l3.52 1.6 0.128 0.064c10.944 5.12 15.616 18.24 10.432 29.12-15.616 32.896-27.136 56.32-34.432 70.4-3.904 7.552-7.552 14.336-10.88 20.48l-11.712 21.12 54.592 14.592 2.944-0.64 6.208-4.928c29.44-23.68 61.76-58.88 96.896-105.92 6.4-8.512 17.984-11.328 27.584-6.72l3.2 1.536a22.208 22.208 0 0 1 10.432 29.504c-15.36 32.384-26.752 55.68-34.112 69.76a854.4 854.4 0 0 1-10.88 20.48l-11.712 21.12 55.04 14.72 2.944-0.64 6.208-4.928c29.44-23.68 61.76-58.944 96.96-105.984 6.4-8.512 17.92-11.328 27.52-6.784l3.2 1.536h0.064a22.016 22.016 0 0 1 10.432 29.44c-21.44 44.608-36.48 74.752-45.12 90.304l-11.712 21.248 63.104 16.832 5.248-0.768c8.064-1.664 15.552-4.48 22.4-8.448 17.024-9.792 26.432-24.96 28.928-46.336 1.856-16.128 31.552-223.616 33.6-255.552l0.832-12.736-2.432-3.456-592.512-158.272-4.096 2.368-4.096 14.976a572.608 572.608 0 0 1-27.584 80c-24.192 55.04-53.568 90.112-86.784 104.192-32.64 13.824-52.224 32.64-55.68 54.848-2.56 16.256 4.096 33.92 17.792 48.64l3.072 3.328 92.16 25.152 3.008-0.64 6.144-4.928 97.152-106.24z"
fill="#ffffff"
p-id="1349"
></path>
</svg>
</span>
</div>
),
},
]
},
},
methods: {
statusChange(item, status) {
let url
if (status) {
url = 'quartzTask/resume'
} else {
url = 'quartzTask/pause'
}
axios.get(url, { id: item.id }).then(res => {
this.$message.success(res.message)
if (res.code === 200) {
this.$set(item, 'status', status)
}
})
},
// 清除日志
clearLog(taskId) {
axios
.get('quartzTask/clearLogs', {
taskId: taskId,
})
.then(res => {
this.$message.success(res.message)
this.getDetail(taskId)
})
},
onCurrentChange(currentPage) {
this.paginationOptions.currentPage = currentPage
this.getList()
},
sizeChange(pageSize) {
this.paginationOptions.pageSize = pageSize
this.getList()
},
cellClass({ row }) {
if (row.authAuditFlag === 1) {
return 'first'
} else {
return ''
}
},
selectionChange(selection) {
if (selection.length > 0) {
this.select = selection
}
},
search() {
this.paginationOptions.currentPage = 1
this.getList(1)
},
currentTabFn(val) {
if (val.row) {
this.formId = val.row.id
}
},
// 修改新增
addDialog(i, v = null) {
if (i === 2) {
if (v) this.formId = v.id
if (!this.formId) {
return this.$message('请勾选至少一条记录')
}
this.selectSection()
} else {
this.$nextTick(() => {
this.addcurrencyform = JSON.parse(
JSON.stringify(this.addcurrencyform2),
)
})
this.is_title = i
this.dialogVisible = true
}
if (this.$refs.addcurrencyform) {
this.$refs.addcurrencyform.resetFields()
}
},
addCurrency() {
if (this.is_title === 1) {
this.addSection()
} else {
this.upSection()
}
},
setpaginationOptions(opt) {
for (const key in opt) {
this.paginationOptions[key] = opt[key]
}
this.getList()
},
// 查询
getList() {
this.loading = true
const {
pageSize,
currentPage,
} = this.paginationOptions
axios
.post('platform/exchangeRateCur/list_page ', {
pageSize,
currentPage,
...this.searchForm,
})
.then(res => {
this.loading = false
if (res.code === 200) {
this.sourceData = res.data.records
this.paginationOptions.total = res.data.total
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
},
// 修改
upSection() {
const url = 'platform/user/update'
this.$refs.addcurrencyform.validate(valid => {
if (valid) {
const data = JSON.parse(
JSON.stringify(this.addcurrencyform),
)
let roleIds = this.addcurrencyform.funcRoleIds.concat(
this.addcurrencyform.dataRoleIds,
)
roleIds = roleIds.join()
data.roleIds = roleIds
axios.post(url, data).then(res => {
if (res.code === 200) {
this.dialogVisible = false
this.$message({
message: '修改成功',
type: 'success',
})
this.getList(
this.paginationOptions.currentPage,
)
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
}
})
},
// 新增
addSection() {
const url = 'baseExchangeRateCur/add'
this.$refs.addcurrencyform.validate(valid => {
if (valid) {
const data = JSON.parse(
JSON.stringify(this.addcurrencyform),
)
let roleIds = this.addcurrencyform.funcRoleIds.concat(
this.addcurrencyform.dataRoleIds,
)
roleIds = roleIds.join()
data.roleIds = roleIds
axios.post(url, data).then(res => {
if (res.code === 200) {
this.dialogVisible = false
this.$alert(
'添加成功\n\r 用户密码为:' +
res.data?.passWord || '',
)
this.getList()
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
}
})
},
// 删除
deleteSection(id) {
axios
.get('quartzTask/delete', { ids: id })
.then(res => {
this.$message.success(res.message)
})
},
},
}
</script>
<style scoped>
.wraper {
display: flex;
flex-direction: column;
height: 100%;
}
.table_wrap {
flex: 1;
}
.circle {
display: inline-block;
height: 10px;
width: 10px;
border-radius: 5px;
margin-right: 5px;
}
.my-table >>> .first {
background-color: red !important;
color: #fff !important;
}
</style>
\ No newline at end of file
...@@ -467,12 +467,11 @@ export default { ...@@ -467,12 +467,11 @@ export default {
Edit, Edit,
}, },
data() { data() {
const userInfo = localStorage.getItem('userinfo') const userInfo = localStorage.getItem('user')
let employeeId let employeeId
if (userInfo) { if (userInfo) {
employeeId = JSON.parse(userInfo).employeeId employeeId = JSON.parse(userInfo).employeeId
} }
return { return {
loading: false, loading: false,
detailLoading: false, detailLoading: false,
...@@ -483,6 +482,7 @@ export default { ...@@ -483,6 +482,7 @@ export default {
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
userInfo: JSON.parse(userInfo),
taskLeader: '', taskLeader: '',
assignVisible: false, assignVisible: false,
periodTime: [], periodTime: [],
...@@ -527,7 +527,7 @@ export default { ...@@ -527,7 +527,7 @@ export default {
) )
}, },
computed: { computed: {
...mapState(['deptStaff', 'userInfo']), ...mapState(['deptStaff']),
tableColumns() { tableColumns() {
// const employeeId = this.employeeId // const employeeId = this.employeeId
return [ return [
...@@ -536,7 +536,7 @@ export default { ...@@ -536,7 +536,7 @@ export default {
key: 'title', key: 'title',
minWidth: 120, minWidth: 120,
align: 'left', align: 'left',
render: (item) => ( render: item => (
<span style="position: relative;"> <span style="position: relative;">
<span>{item.title}</span> <span>{item.title}</span>
{item.sign === 1 && {item.sign === 1 &&
...@@ -567,6 +567,11 @@ export default { ...@@ -567,6 +567,11 @@ export default {
width: 80, width: 80,
}, },
{ {
label: '验收意见',
key: 'evaluations',
width: 140,
},
{
label: '负责人', label: '负责人',
key: 'leaderNames', key: 'leaderNames',
width: 80, width: 80,
...@@ -579,7 +584,7 @@ export default { ...@@ -579,7 +584,7 @@ export default {
{ {
label: '描述', label: '描述',
key: 'content', key: 'content',
render: (item) => { render: item => {
return ( return (
<div <div
class="description" class="description"
...@@ -618,7 +623,7 @@ export default { ...@@ -618,7 +623,7 @@ export default {
fixed: 'right', fixed: 'right',
width: 80, width: 80,
align: 'center', align: 'center',
render: (item) => ( render: item => (
<span> <span>
{ {
<span <span
...@@ -848,8 +853,10 @@ export default { ...@@ -848,8 +853,10 @@ export default {
}, },
async getlist() { async getlist() {
this.loading = true this.loading = true
const { pageSize, currentPage } = const {
this.centerPageOptions pageSize,
currentPage,
} = this.centerPageOptions
axios axios
.post('platform/platformWorkOrder/list_page', { .post('platform/platformWorkOrder/list_page', {
pageSize, pageSize,
...@@ -862,7 +869,7 @@ export default { ...@@ -862,7 +869,7 @@ export default {
this.searchForm.leaders && this.searchForm.leaders &&
this.searchForm.leaders.join(','), this.searchForm.leaders.join(','),
}) })
.then((res) => { .then(res => {
if (res.code !== 200) return if (res.code !== 200) return
this.sourceData = res.data.records this.sourceData = res.data.records
this.centerPageOptions.total = res.data.total this.centerPageOptions.total = res.data.total
...@@ -966,7 +973,7 @@ export default { ...@@ -966,7 +973,7 @@ export default {
.get( .get(
`platform/platformWorkOrderChat/getByWorkOrder?workOrderId=${item.id}`, `platform/platformWorkOrderChat/getByWorkOrder?workOrderId=${item.id}`,
) )
.then((res) => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
this.chatRecord = res.data this.chatRecord = res.data
} }
......
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