390b3816 by xiaomiao

--no commit message

1 parent 49ec079a
......@@ -20,6 +20,7 @@
"nprogress": "0.2.0",
"vue": "2.6.10",
"vue-awesome": "^4.5.0",
"vue-json-editor": "^1.4.3",
"vue-router": "3.0.2",
"vuex": "3.1.0",
"xe-utils": "^3.5.7"
......
<template>
<el-dialog
:title="title"
:visible.sync="visible"
:width="width"
:append-to-body="appendToBody"
:modal="modal"
:close-on-click-modal="false"
:fullscreen="fullscreen"
:destroy-on-close="destroyOnClose"
:modal-append-to-body="modalAppendToBody"
:class="customClass"
@close="close"
class="dialog"
>
<slot name="content" />
<span slot="footer" class="dialog-footer">
<slot name="footer" />
</span>
</el-dialog>
</template>
<script>
export default {
name: '',
props: {
show: {
type: Boolean,
default: false
},
customClass: {
type: String,
default: ''
},
title: {
type: String,
default: '新增'
},
appendToBody: {
// Dialog 自身是否插入至 body 元素上。嵌套的 Dialog 必须指定该属性并赋值为 true
type: Boolean,
default: true
},
modalAppendToBody: {
// 遮罩层是否插入至 body 元素上,若为 false,则遮罩层会插入至 Dialog 的父元素上
type: Boolean,
default: true
},
modal: {
// 是否需要遮罩层
type: Boolean,
default: true
},
fullscreen: {
// 是否全屏
type: Boolean,
default: false
},
destroyOnClose: {
// 关闭时销毁 Dialog 中的元素
type: Boolean,
default: false
},
width: {
type: String,
default: '30%'
}
},
data() {
return {}
},
computed: {
visible: {
get() {
return this.show
},
set(val) {
this.$emit('update:show', val) // visible 改变的时候通知父组件
}
}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
.dialog {
/deep/.el-dialog{
overflow: hidden;
background: url("~@/image/dialogBg.png") no-repeat !important;
background-size: 100% 100% !important;
}
.el-dialog__header {
padding: 0;
height: 56px;
line-height: 56px;
border-bottom: none;
.el-dialog__title {
font-weight: 400;
}
.el-dialog__title:before {
display: inline-block;
content: '';
width: 4px;
height: 16px;
background: #3aa3f8;
margin-left: 12px;
margin-right: 8px;
position: relative;
top: 2px;
}
.el-dialog__headerbtn {
position: absolute;
// top: 2%;
right: 12px;
}
}
.el-dialog__body {
margin: 0px 12px;
padding: 48px 24px;
background: #fff;
border: 1px solid #dfe7f3;
.el-button {
padding: 8px 16px;
border: none;
}
.el-form {
.el-checkbox {
line-height: 32px;
height: 32px;
}
.form-item-mb0 {
margin-bottom: 0 !important;
}
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
height: 32px;
line-height: 32px;
vertical-align: middle;
}
.el-form-item__content {
// height: 32px;
line-height: 32px;
// date 组件有图标
.has-icon.el-date-editor {
.el-input__inner {
padding-left: 32px;
}
}
.el-input__inner {
padding: 0 8px;
height: 32px;
line-height: 32px;
text-align: left;
}
.el-textarea__inner {
padding: 8px 8px;
}
.el-input .el-input__icon {
font-size: 14px;
color: #747e8c;
}
}
}
}
.el-select,
.el-cascader,
.el-date-editor {
width: 100%;
line-height: 32px;
}
}
.el-dialog__footer {
padding: 0 12px;
height: 56px;
line-height: 56px;
border: none;
.el-button {
padding: 8px 16px;
border: none;
}
.el-button + .el-button {
margin-left: 12px;
}
}
}
</style>
<template>
<div class="icon-List">
<el-dialog
:visible.sync="visible"
:append-to-body="true"
:show-close="isClose"
>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="内置图标" name="first">
<ul v-if="iconList" class="clearfix">
<li
v-for="(item, index) in iconList"
:key="index"
@click="changeData(item)"
>
<i :class="item" />
</li>
</ul>
</el-tab-pane>
<el-tab-pane label="自定义图标" name="second">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon">
<p>点击上传</p>
</i>
</el-upload>
<div>
<el-input v-model="iconName" class="icon-name" placeholder="请输入图标代码"></el-input>
</div>
<el-button class="confirm" type="primary" @click="changeIconName">确定</el-button>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>
<script>
import icoNameList from '@/utils/elementUI'
export default {
name: 'IconList',
components: {},
props: {},
data() {
return {
visible: false,
isClose: false,
iconList: [],
activeName: 'first',
iconName: '',
imageUrl: ''
}
},
computed: {},
watch: {},
created() {},
mounted() {
this.iconList = icoNameList
},
methods: {
show(show) {
this.visible = show
},
handleClick(tab, event) {
console.log(tab, event)
},
changeData(iconName) {
this.visible = false
// 传递图标名称给父级
this.$emit('iconName', iconName)
},
changeIconName() {
this.visible = false
// 传递图标名称给父级
this.$emit('iconName', this.iconName)
}
}
}
</script>
<style scoped lang="scss">
::v-deep .el-dialog {
box-shadow: 0px 4px 10px 0px #666666;
border-radius: 4px;
width: 573px;
height: 300px;
position: relative;
top: 4vh;
left: 0vw;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 10px;
}
.el-tabs {
.el-tabs__content {
height: 200px;
overflow-y: scroll;
ul {
li {
float: left;
padding: 1%;
margin: 2px;
border: 1px solid #e8eaec;
cursor: pointer;
width: 30px;
height: 30px;
}
}
.avatar-uploader-icon {
font-size: 12px;
color: #8c939d;
text-align: center;
width: 62px;
height: 62px;
background: #f6f7f9;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding-top: 32%;
}
}
}
.confirm {
float: right;
margin-top: 30px;
}
.icon-name {
width: 70%;
margin-top: 10px;
}
}
</style>
<template>
<div>
<i class="icon-tubiao-242 iconfont" :title="title" @click="openDialog" />
<el-dialog
:key="key"
:title="title"
:inner-dialog="true"
:visible.sync="dialogVisible"
width="600px"
:close-on-click-modal="false"
append-to-body
@cancel="cancel"
>
<vue-json-editor
id="minejson"
v-model="resultInfo"
:mode="'code'"
lang="zh"
@json-change="onJsonChange"
@json-save="onJsonSave"
@has-error="onError"
/>
<el-tooltip
content="全屏缩放"
effect="dark"
placement="bottom"
fullscreen
class="fullScreen"
>
<i class="el-icon-full-screen" @click="enLarge" />
</el-tooltip>
<template slot="footer">
<div class="dialog-footer flex flex-pack-center">
<el-button
type="primary"
class="confirmBtn"
@click="onJsonSave"
>保存</el-button>
<el-button
type="primary"
class="cancelBtn"
@click="cancel"
>关闭</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import vueJsonEditor from 'vue-json-editor'
export default {
components: {
vueJsonEditor
},
props: {
title: {
type: String,
default: '配置参数'
},
resultInfos: {
type: String,
default: ''
}
},
data() {
return {
activeNames: [],
resultInfo: {},
tmpResultInfo: {},
dialogVisible: false,
hasJsonFlag: true,
key: 0,
isEnlarge: false
}
},
watch: {
resultInfos: {
handler: function(val) {
++this.key
this.resultInfo =
this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
this.tmpResultInfo = this.resultInfo
},
deep: true,
immediate: true
}
},
mounted() {
this.resultInfo =
this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
},
methods: {
onJsonChange(value) {
// 只有在格式正确的时候进入此事件
this.hasJsonFlag = true
},
onJsonSave() {
const value = this.resultInfo
console.log(this.resultInfo, 'resultInfo')
if (this.hasJsonFlag === false) {
this.$message.error({ message: 'json格式验证失败', showClose: true })
// alert("json验证失败")
return false
} else {
this.dialogVisible = false
this.$emit('getJsonString', JSON.stringify(value))
return true
}
},
onError(value) {
this.hasJsonFlag = false
},
openDialog() {
this.dialogVisible = true
},
cancel() {
console.log(this.tmpResultInfo, 'tmpResultInfo')
this.resultInfo = this.tmpResultInfo
this.dialogVisible = false
},
// 放大
enLarge() {
const fullarea = document.getElementById('minejson')
if (fullarea.requestFullscreen) {
fullarea.requestFullscreen()
} else if (fullarea.webkitRequestFullScreen) {
fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等)
} else if (fullarea.mozRequestFullScreen) {
fullarea.mozRequestFullScreen() // moz内核(firefox)
} else if (fullarea.msRequestFullscreen) {
fullarea.msRequestFullscreen() // IE11、edge
}
this.isEnlarge = true
}
}
}
</script>
<style scoped lang="scss">
/* jsoneditor右上角默认有一个链接,加css去掉了 */
.iconfont {
cursor: pointer;
position: relative;
top: 1px;
color: #349af3;
}
::v-deep .jsoneditor-vue {
height: 100%;
}
.fullScreen {
position: absolute;
right: 5%;
top: 22%;
cursor: pointer;
color: #fff;
}
::v-deep .jsoneditor-modes {
display: none !important;
}
.jsoneditor-poweredBy {
display: none !important;
}
.jsoneditor-menu {
background-color: #9c9e9f !important;
border-bottom: 1px solid #9c9e9f !important;
}
.jsoneditor {
border: 1px solid #9c9e9f !important;
}
.el-collapse {
border: 0;
}
.el-collapse-item__header {
height: 44px;
}
</style>
......@@ -104,13 +104,6 @@
<Xyjg :form-data = 'dataReport'></Xyjg>
</div>
<JsonEditor :resultInfo="resultInfo" v-if="titleName == 'xml'" />
<!-- <div slot="footer" class="dialog_footer" ref="dialogFooter">
<div class="dialog_button">
<el-button type="primary" plain @click="submitForm" v-if="!Edit" :loading="saveloding">确定
</el-button>
<el-button @click="closeDialog()">关闭</el-button>
</div>
</div> -->
</el-dialog>
</template>
......
......@@ -16,23 +16,7 @@ export default {
data () {
return {
cdata: {
seriesData: [
{ value: 10, name: "土地所有权" },
{ value: 5, name: "建设用地、宅基地使用权" },
{ value: 15, name: "房地产权(项目内多幢房屋)" },
{ value: 25, name: "产地产权(独幢、层、套、间、房屋)" },
{ value: 20, name: "建筑物区分所有权业主共有部分" },
{ value: 35, name: "海域(含无居民海岛)使用权" },
{ value: 10, name: "构(建)筑物所有权" },
{ value: 5, name: "农用地使用权(非林地)" },
{ value: 15, name: "林权" },
{ value: 25, name: "注销登记" },
{ value: 20, name: "异议登记" },
{ value: 35, name: "预告登记" },
{ value: 20, name: "查封登记" },
{ value: 35, name: "抵押权登记" },
{ value: 20, name: "地役权登记" },
],
seriesData: [],
},
};
},
......@@ -41,22 +25,30 @@ export default {
},
mounted () {
this.getdjywltotal();
},
methods: {
getdjywltotal () {
return new Promise(async (resolve) => {
async getdjywltotal () {
try {
let p = {
DJLX: "A21",
QLLX: "A8",
XZQDM: "A20",
DJLX: "",
QLLX: "",
XZQDM: "",
};
let res = await work.getdjywltotal(p);
console.log("res",res);
res.result.filter((item) => {
return (
this.cdata.seriesData.push({ "name": item.AREACODE, "value": item.ywtotal })
)
});
console.log("this.cdata.seriesData",this.cdata.seriesData);
} catch (error) {
this.$refs.msg.messageShow();
}
});
},
},
};
......
......@@ -28,8 +28,8 @@ export default {
res.filter((item) => {
return (
this.cdata.category.push(item.areaName),
this.cdata.lineData.push(item.successCount),
this.cdata.barData.push(item.failureCount)
this.cdata.barData.push(item.successCount),
this.cdata.lineData.push(item.failureCount)
);
});
} catch (error) {
......
......@@ -17,9 +17,6 @@ export default {
components: {
Chart,
},
created () {
},
mounted () {
this.getDjlxtotal();
},
......@@ -28,9 +25,9 @@ export default {
return new Promise(async (resolve) => {
try {
let p = {
DJLX: "A21",
QLLX: "A8",
XZQDM: "A20",
DJLX: "",
QLLX: "",
XZQDM: "",
};
let res = await work.getDjlxtotal(p);
res.result.filter((item) => {
......
const icoNameList = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round']
.map(s => 'el-icon-' + s)
export default icoNameList
......@@ -5,3 +5,26 @@
export function isExternal (path) {
return /^(https?:|mailto:|tel:)/.test(path)
}
// ex: {validator:validateCode,trigger:'blur'}
// 验证code
export const validateCode = (rule, value, callback) => {
const reg = /^[A-Z]{1}[A-Za-z0-9]*$/
!reg.test(value) ? callback('字母开头、数字和字母组成') : callback()
}
// 验证 网址
export const validateUrl = (rule, value, callback) => {
const reg = /^(((ht|f)tps?):\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?$/
!reg.test(value) ? callback('URL格式不正确') : callback()
}
// 验证 电话
export const validatePhone = (rule, value, callback) => {
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
const rel = /^[0]\d{2,3}-[1-9]\d{7}$/
if (!value) {
callback()
} else {
!(phoneReg.test(value) || rel.test(value))
? callback(new Error('请输入正确的联系电话'))
: callback()
}
}
......
......@@ -18,7 +18,7 @@
</p>
<p>
<span>成功率</span>
<span class="cg">99%</span>
<span class="cg">{{qxcgl}}</span>
</p>
</div>
</div>
......@@ -41,7 +41,7 @@
</p>
<p>
<span>成功率</span>
<span class="cg">99%</span>
<span class="cg">{{stcgl}}</span>
</p>
</div>
</div>
......@@ -60,12 +60,14 @@ export default {
data () {
return {
// 日均接入量
qxerrer: 0,
qxsuccess: 0,
sterrer: 0,
stsuccess: 0,
qxjrl: 50300,
stjrl: 50300,
qxerrer: "",
qxsuccess: "",
sterrer: "",
stsuccess: "",
qxjrl: "",
stjrl: "",
qxcgl:"",
stcgl:""
};
},
mounted () {
......@@ -79,12 +81,6 @@ export default {
stjrlList: function () {
return this.stjrl.toString().split("");
},
sbqkgsList: function () {
const numbers = this.sbqkgs.toString().split("").reverse();
const segs = [];
while (numbers.length) segs.push(numbers.splice(0, 3).join(""));
return segs.join(",").split("").reverse().join("");
},
},
methods: {
getsthjqxjrtotal () {
......@@ -96,6 +92,18 @@ export default {
XZQDM: "A20",
};
let res = await work.getsthjqxjrtotal(p);
this.stjrl=Number(res.result.sum)
this.qxjrl=Number(res.result.sum)
this.qxerrer=Number(res.result.qxjrerrer)
this.sterrer=Number(res.result.sthjerrer)
if(res.result.sum=="0"){
this.qxcgl="100%"
this.stcgl="100%"
}else{
this.qxcgl=Number(res.result.qxjrsuccess)/this.qxjrl*100+"%"
this.stcgl=Number(res.result.sthjsuccess)/Number(res.result.sum)*100+"%"
}
} catch (error) {
this.$refs.msg.messageShow();
}
......
......@@ -6,37 +6,22 @@ class data extends filter {
columns () {
return [
{
prop: "job_name",
label: "任务名称",
width: 130
},
{
prop: "description",
label: "任务描述",
prop: "name",
label: "菜单名称",
width: 300
},
{
prop: "cron_expression",
label: "cron表达式"
prop: "code",
label: "菜单代码"
},
{
prop: "bean_class",
prop: "uri",
width: 260,
label: "任务类"
label: "链接路径"
},
{
prop: "job_group",
label: "任务分组"
},
{
label: "状态",
render: (h, scope) => {
return (
<div>
{ this.stateStatus(scope.row.job_status) }
</div>
)
},
prop: "icon",
label: "图标"
}
]
}
......
<template>
<div>
<Dialog
:title="title"
:show.sync="visible"
:width="'767px'"
@close="close()"
>
<template slot="content">
<el-form ref="form" :model="form" :rules="rules">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="菜单名称:" prop="name" label-width="124px">
<el-input v-model="form.name" placeholder="请输入菜单名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="图标:" label-width="54px">
<el-input
v-model="form.icon"
placeholder="请选择图标"
:prefix-icon="form.icon"
clearable
@focus="getIconList"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="上级菜单:" label-width="124px">
<el-cascader
:key="menuKey"
v-model="form.parentId"
:options="parentMenuList"
:props="setProps"
placeholder="请选择上级菜单"
clearable
@change="handleChange"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="代码:" prop="code" label-width="54px">
<el-input
v-model="codeComputed"
placeholder="请输入菜单代码"
:disabled="type === 1"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="链接路径:" label-width="124px">
<el-input v-model="form.uri" placeholder="请输入链接路径" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="浏览器跳转模式:" label-width="124px">
<el-select
v-model="form.jumpMode"
placeholder="请选择浏览器跳转模式"
>
<el-option
v-for="item in jumpModeList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item
label="配置参数:"
label-width="124px"
class="form-item-mb0"
>
<!-- 配置参数 -->
<JsonEditor
:result-infos="form.metadata"
@getJsonString="getJsonString"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<template slot="footer">
<el-button class="cancel-button" @click="close()">取消</el-button>
<el-button type="primary" @click="submitForm()">保存</el-button>
</template>
</Dialog>
<!-- 图标列表 -->
<IconList ref="iconList" @iconName="getIconName" />
</div>
</template>
<script>
import Dialog from "@/components/Dialog/";
// import JsonEditor from '@components/JsonEditors'
import JsonEditor from '../../../components/JsonEditors'
// import IconList from '@components/IconList'
import IconList from '../../../components/IconList'
import { validateCode } from '../../../utils/validate';
export default {
name: "EditDialog",
components: {
Dialog,
JsonEditor,
IconList,
},
data() {
return {
form: {
icon: "",
code: "",
},
rules: {
name: [{ required: true, message: "请输入菜单名称", trigger: "blur" }],
code: [
{ required: true, message: "必填", trigger: "blur" },
{ validator: validateCode, trigger: "blur" },
],
},
title: "",
type: "",
visible: false,
parentMenuList: [],
menuKey: 0,
jumpModeList: [
{ name: "在当前页面显示", value: 1 },
{ name: "跳转到新页面", value: 2 },
],
setProps: {
value: "id",
label: "name",
children: "children",
expandTrigger: "hover",
checkStrictly: true, // 可取消关联,选择任意一级选项
emitPath: false,
},
// dataUrl: api.menus,
};
},
computed: {
codeComputed: {
get: function() {
return this.form.code
},
set: function(val) {
this.form.code = val.toUpperCase()
}
}
},
created() {},
mounted() {},
methods: {
getParentMenuList() {
// getParentMenuListAction(id).then((res) => {
// if (res.status === 1) {
// const list = this.$dealArrChildren(res.content)
// if (id) {
// this.parentMenuList = this.$dealArrDisabled(
// this.$deepCopy(list),
// id
// )
// this.menuKey++
// } else {
// this.parentMenuList = list
// }
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
},
getIconList() {
this.$refs.iconList.show(true);
},
// 选择图标
getIconName(data) {
this.form.icon = data;
},
getJsonString(data) {
this.form.metadata = data;
},
add() {
// console.log(this.productId)
// if (!this.productId) {
// this.$message.info({
// message: '请先选择子系统才能添加菜单,如果没有,请先添加子系统!',
// showClose: true
// })
// return
// }
// this.getParentMenuList(this.productId)
this.visible = true;
// this.type = 0
// this.form.jumpMode = 1
},
edit(record) {
// this.type = 1
// // 若有id为编辑
// if (record.id) {
// this.$nextTick(() => {
// this.form = Object.assign({}, record)
// this.getParentMenuList(this.productId)
// })
// }
this.visible = true;
},
addChild(record) {
// this.getParentMenuList(this.productId)
this.visible = true;
// this.type = 2
// this.form.jumpMode = 1
// this.form.parentId = record.id
},
handleChange(value) {
// this.form.parentId = value
},
submitForm(submitType) {
// this.$refs.form.validate((valid) => {
// if (valid) {
// let method = "";
// let url = "";
// const formData = this.form;
// formData.productId = this.productId;
// if (!formData.id) {
// method = "post";
// url = this.dataUrl;
// } else {
// method = "put";
// url = `${this.dataUrl}/${formData.id}`;
// }
// httpAction(url, formData, method)
// .then((res) => {
// if (res.status === 1) {
// this.$message.success({
// message: res.message,
// showClose: true,
// });
// // this.$emit("ok");
// // this.type 0新增 1编辑 2添加子
// if (this.type === 0) {
// if (submitType === 1) {
// this.close();
// } else {
// this.resetForm();
// }
// } else if (this.type === 1) {
// this.close();
// } else if (this.type === 2) {
// if (submitType === 1) {
// this.close();
// } else {
// this.resetForm();
// this.form.parentId = formData.parentId;
// }
// }
// this.$emit("ok");
// } else {
// this.$message.error({ message: res.message, showClose: true });
// }
// })
// .catch((err) => {
// console.log(err);
// });
// }
// });
},
resetForm() {
this.$refs.form.resetFields();
this.form = {
icon: "",
code: "",
};
},
close() {
this.resetForm();
this.visible = false;
},
},
};
</script>
<style scoped lang="scss">
.el-form {
.el-input {
.el-input__icon {
font-size: 14px;
// color: #3AA3F8 !important;
}
}
}
</style>
......@@ -7,36 +7,17 @@ class data extends filter {
return [
{
prop: "job_name",
label: "任务名称",
width: 130
label: "角色名称",
width: 330
},
{
prop: "description",
label: "任务描述",
width: 300
label: "类别",
width: 400
},
{
prop: "cron_expression",
label: "cron表达式"
},
{
prop: "bean_class",
width: 260,
label: "任务类"
},
{
prop: "job_group",
label: "任务分组"
},
{
label: "状态",
render: (h, scope) => {
return (
<div>
{ this.stateStatus(scope.row.job_status) }
</div>
)
},
label: "备注"
}
]
}
......
<!-- 新增 & 修改角色 -->
<template>
<Dialog
:title="dialogTitle"
:show.sync="showAddEditDialog"
:width="'767px'"
@close="handleCloseDialog()"
>
<template slot="content">
<el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="角色名称:" prop="roleName">
<el-input
v-model="dialogForm.roleName"
clearable
placeholder="请输入角色名称"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="角色类型:" prop="roleType">
<!-- <el-select v-model="dialogForm.roleType.value" placeholder="请输入角色类型">
<el-option
v-for="item in roleTypeOptions"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select> -->
<el-input
v-model="dialogForm.roleType"
clearable
placeholder="请输入角色类型"
/>
</el-form-item>
</el-col>
</el-row>
<br>
<el-row>
<el-col :span="24">
<el-form-item label="备注:" class="form-item-mb0">
<el-input
v-model="dialogForm.roleTextArea"
type="textarea"
placeholder="请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<template slot="footer">
<el-button
class="cancel-button"
@click="handleCloseDialog"
>取消</el-button>
<el-button
type="primary"
@click="handleSaveRole()"
>保存</el-button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@/components/Dialog/";
export default {
components: {
Dialog
},
data() {
return {
dialogTitle: '',
showAddEditDialog: false,
menuType: '',
roleId: '',
sort: 0,
dialogForm: {
roleName: '',
roleType: '',
roleTextArea: ''
},
rules: {
roleName: [
{ required: true, message: '请输入角色名称', trigger: 'blur' }
],
roleType: [
{ required: true, message: '请输入角色类型', trigger: 'blur' }
]
},
roleTypeOptions: [
{ name: '定制', value: '定制' },
{ name: '其他', value: '其他' }
]
}
},
methods: {
// 保存新增或关闭事件
handleSaveRole(val) {
this.$refs.form.validate((valid) => {
if (valid) {
try {
const params = {
category: this.menuType,
description: this.dialogForm.roleTextArea,
name: this.dialogForm.roleName,
sort: this.sort,
type: this.dialogForm.roleType
}
if (this.roleId) {
// params.id = this.roleId
// httpAction(`${api.roles}/${params.id}`, params, 'post').then(
// (res) => {
// if (res.status === 1) {
// this.$message.success({
// message: '修改成功',
// showClose: true
// })
// this.dialogForm = {
// roleName: '',
// roleType: ''
// }
// this.showAddEditDialog = val
// this.$emit('ok', this.menuType)
// } else {
// this.$message.error({
// message: res.message,
// showClose: true
// })
// }
// }
// )
} else {
// httpAction(api.roles, params, 'post').then((res) => {
// if (res.status === 1) {
// this.$message.success({
// message: '新增成功',
// showClose: true
// })
// this.dialogForm = {
// roleName: '',
// roleType: ''
// }
// this.showAddEditDialog = val
// this.$emit('ok', this.menuType)
// } else {
// this.$message.error({
// message: res.message,
// showClose: true
// })
// }
// })
}
} catch (e) {
console.error(e)
}
}
})
},
// 取消事件
handleCloseDialog() {
this.dialogForm = {
roleName: '',
roleType: ''
}
this.showAddEditDialog = false
}
}
}
</script>
<style scoped lang="scss"></style>
<template>
<Dialog :title="title" :show.sync="visible" :width="'715px'" @close="close()">
<template slot="content">
<vxe-table
show-overflow
:data="memberList"
border
class="header-bg-type1"
auto-resize
:checkbox-config="{ highlight: true, range: true }"
highlight-hover-row
max-height="500px"
:empty-render="{ name: 'NotData' }"
>
<template #empty>
<table-empty />
</template>
<vxe-table-column
type="checkbox"
width="60"
align="left"
fixed="left"
/>
<vxe-table-column
field="code"
title="工号"
fixed="left"
min-width="100"
show-header-overflow="tooltip"
show-overflow="tooltip"
align="left"
/>
<vxe-table-column
title="姓名"
fixed="left"
show-header-overflow="tooltip"
show-overflow="tooltip"
>
<template slot-scope="scope">
<svg-icon
:icon-class="
scope.row.sex === '0'
? 'male'
: scope.row.sex === '1'
? 'female'
: 'secrecy'
"
/>
{{ scope.row.name }}
</template>
</vxe-table-column>
<vxe-table-column
field="loginName"
title="用户名"
fixed="left"
show-header-overflow="tooltip"
show-overflow="tooltip"
/>
<vxe-table-column
field="departmentName"
title="部门"
show-header-overflow="tooltip"
show-overflow="tooltip"
/>
</vxe-table>
</template>
<template slot="footer">
<el-button type="primary" class="save" @click="submitForm(1)"
>保存</el-button
>
<el-button class="cancel-button" @click="close()">取消</el-button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@/components/Dialog/";
export default {
name: "",
components: { Dialog },
props: {},
data() {
return {
form: {
sex: "0",
},
memberList: [
{
id: "3127e455-43ba-45ff-9326-0e02ef89485e",
createdAt: null,
updatedAt: "2022-08-04T03:38:27.626+0000",
createdBy: null,
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 1,
name: "超级管理员",
loginName: "admin",
password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59",
passwordSalt: "5178114777136485",
email: null,
lastLoginTime: null,
mobilePhone: "18291003568",
status: "ACTIVE",
passwordChangeTime: "2021-12-10T08:01:01.569+0000",
idCard: "612725202111021521",
departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
sex: "0",
isDuty: true,
code: "123324",
jobLevel: null,
telephone: "028-87720898",
address: "办公地点修改测试",
isLocked: false,
departmentName: "研发部",
_X_ROW_KEY: "row_276",
},
],
title: "",
type: "",
visible: false,
showLoginName: false,
options: [],
setProps: {
value: "id",
label: "name",
children: "children",
expandTrigger: "hover",
checkStrictly: true, // 可取消关联,选择任意一级选项
emitPath: false,
},
sexList: [],
levelList: [],
organizationId: "", // 组织机构ID
departmentId: "", // 部门ID
};
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
adds() {
this.visible = true;
},
edit(record) {
this.visible = true;
},
handleChange(value) {
this.form.departmentId = value;
},
close() {
// this.resetForm()
this.visible = false;
},
},
};
</script>
<style scoped lang="scss">
.el-form {
.el-form-item__content {
.el-radio {
margin-right: 6px;
}
}
.el-checkbox {
line-height: 40px;
}
.col-pd0 {
padding: 0 !important;
}
}
</style>
......@@ -21,7 +21,6 @@
:data="tableData.data">
</lb-table>
<add-task ref="task" :taskData="taskData" />
<message-tips ref="msg" :message="message" />
</div>
</div>
</template>
......@@ -123,7 +122,6 @@ export default {
}
} catch (error) {
this.message = error
this.$refs.msg.messageShow()
}
},
// 暂停
......
......@@ -6,37 +6,35 @@ class data extends filter {
columns () {
return [
{
prop: "job_name",
label: "任务名称",
prop: "code",
label: "工号",
width: 130
},
{
prop: "description",
label: "任务描述",
prop: "name",
label: "姓名",
width: 300
},
{
prop: "cron_expression",
label: "cron表达式"
prop: "loginName",
label: "用户名"
},
{
prop: "bean_class",
prop: "isDuty",
width: 260,
label: "任务类"
label: "负责人"
},
{
prop: "job_group",
label: "任务分组"
prop: "departmentName",
label: "所属部门"
},
{
label: "状态",
render: (h, scope) => {
return (
<div>
{ this.stateStatus(scope.row.job_status) }
</div>
)
prop: "job_group",
label: "职位"
},
{
prop: "telephone",
label: "电话"
}
]
}
......
<template>
<Dialog :title="title" :show.sync="visible" :width="'715px'" @close="close()">
<template slot="content">
<el-form ref="form" :model="form" :rules="rules">
<el-row :gutter="24">
<el-col :span="11">
<el-form-item label="姓名:" prop="name" label-width="100px">
<el-input v-model="form.name" placeholder="请输入姓名" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-col :span="18" class="col-pd0">
<el-form-item label="性别:" label-width="72px">
<el-radio
v-for="(item, index) in sexList"
:key="index"
v-model="form.sex"
:label="item.value"
>{{ item.name }}</el-radio
>
</el-form-item>
</el-col>
<el-col :span="6">
<el-checkbox v-model="form.isDuty">负责人</el-checkbox>
</el-col>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="11">
<el-form-item label="工号:" prop="code" label-width="100px">
<el-input v-model="form.code" placeholder="请输入工号" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item label="用户名:" prop="loginName" label-width="72px">
<el-input
v-model="form.loginName"
:disabled="showLoginName"
placeholder="请输入用户名"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="11">
<el-form-item label="身份证号码:" label-width="100px">
<el-input v-model="form.idCard" placeholder="请输入身份证号码" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item
label="手机号码:"
prop="mobilePhone"
label-width="72px"
>
<el-input
v-model="form.mobilePhone"
placeholder="请输入手机号码"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="11">
<el-form-item label="最高职务级别:" label-width="100px">
<el-select
v-model="form.jobLevel"
placeholder="请选择最高职务级别"
>
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item label="办公电话:" prop="telephone" label-width="72px">
<el-input v-model="form.telephone" placeholder="请输入办公电话" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item
label="办公地点:"
label-width="100px"
class="form-item-mb0"
>
<el-input v-model="form.address" placeholder="请输入办公地点" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<template slot="footer">
<el-button type="primary" class="save" @click="submitForm(1)">保存</el-button>
<el-button class="cancel-button" @click="close()">取消</el-button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@/components/Dialog/";
export default {
name: "",
components: { Dialog },
props: {},
data() {
return {
form: {
sex: "0",
},
rules: {
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
code: [{ required: true, message: "请输入工号", trigger: "blur" }],
mobilePhone: [{ validator: "sddd", trigger: "blur" }],
loginName: [
{ required: true, message: "请输入用户名", trigger: "blur" },
],
},
title: "",
visible: false,
showLoginName: false,
sexList: [{lable:"0",value:"0",name:"男"},{lable:"1",value:"1",name:"女"}],
levelList: [{lable:"0",value:"0",name:"干事"},{lable:"1",value:"1",name:"经理"}],
organizationId: "", // 组织机构ID
departmentId: "", // 部门ID
};
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
// initDictConfig() {
// getDictItems('XB').then((res) => {
// if (res.status === 1) {
// this.sexList = res.content
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// getDictItems('ZWJB').then((res) => {
// if (res.status === 1) {
// this.levelList = res.content
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// },
add() {
this.visible = true;
// this.type = 0
this.showLoginName = false
},
edit(record) {
// this.initDictConfig()
this.showLoginName = true
// 若有id为编辑
if (record) {
this.$nextTick(() => {
this.form = Object.assign({}, record)
})
}
this.visible = true
},
handleChange(value) {
this.form.departmentId = value;
},
submitForm(submitType) {
this.$refs.form.validate((valid) => {
if (valid) {
let method = ''
let url = ''
const formData = this.form
if (!formData.id) {
method = 'post'
url = this.dataUrl
} else {
method = 'put'
url = `${this.dataUrl}/${formData.id}`
}
httpAction(url, formData, method).then((res) => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
// this.type 0新增 1编辑
if (this.type === 0) {
// submitType 1需要关闭页面 0保存&新增暂不关闭页面
if (submitType === 1) {
this.close()
} else {
this.resetForm()
}
} else if (this.type === 1) {
this.close()
}
this.$emit('ok')
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
} else {
console.log('提交错误!!!')
return false
}
})
},
resetForm() {
this.form = {
sex: '0'
}
this.$refs.form.resetFields()
},
close() {
// this.resetForm()
this.visible = false;
},
},
};
</script>
<style scoped lang="scss">
.el-form {
.el-form-item__content {
.el-radio {
margin-right: 6px;
}
}
.el-checkbox {
line-height: 40px;
}
.col-pd0 {
padding: 0 !important;
}
}
</style>