d5324849 by yangwei
2 parents e9594835 bdde9e93
......@@ -21,6 +21,4 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?
/src/api/config.js
package-lock.json
......
export default {
// SERVERAPI: '/service-bdcsjsb-th', //浩浩
// SERVERAPI: '/service-bdcsjsb-zz',
SERVERAPI: '/bdcsjsb', //赵千
MANAGEMENTAPI: 'http://192.168.2.236/management'
// SERVERAPI: '/bdcsjsb-service'
// SERVERAPI: '/bdcsjsb-jiao0'
}
// 汉中
// export default {
// // SERVERAPI: '/service-bdcsjsb-th', //线上
// SERVERAPI: '/bdcsjsb', //赵千
// MANAGEMENTAPI: 'http://172.16.56.32:8877/management'
// }
......@@ -16,7 +16,7 @@ export const getRolesById = categoryId => {
conditions: [
{
property: 'category',
value:categoryId,
value: categoryId,
operator: 'EQ'
}
],
......@@ -81,3 +81,43 @@ export const getParentMenuListAction = (id) => {
const params = getParams(conditionGroup)
return getAction(api.menus, params)
}
// 获取权限列表
export const getAuthorityListAction = (productId, subsystemCode) => {
const conditionGroup = {
conditions: [
{
property: 'productId',
value: productId,
operator: 'EQ'
},
{
property: 'code',
value: subsystemCode + '_MENU',
operator: 'EQ'
}
],
queryRelation: 'AND'
}
const params = getParams(conditionGroup)
return getAction(api.resourceCategory, params)
}
/**
* 获取角色的权限 id operationCodes resourceCategoryCode
* id 授权id
* operationCodes 操作符集合
* resourceCategoryCode 菜单默认MENU
*/
export const getRoleAuthorityList = (
id,
operationCodes,
resourceCategoryCode
) => {
return getAction(`${api.rolePermissions}/${id}`, {
operationCodes: operationCodes,
resourceCategoryCode: resourceCategoryCode
})
}
// 角色授权
export const roleAuthority = (id, permissionDtos) => {
return putAction(`${api.rolePermissions}/${id}`, permissionDtos)
}
......
......@@ -64,7 +64,7 @@ export default {
})
},
beforeDestroy () {
this.chart.dispose();
// this.chart.dispose();
this.chart = null;
},
methods: {
......
<template>
<!-- 编辑 -->
<el-dialog :close-on-click-modal="false" top="0" @close="closeDialog"
custom-class="dialogBox editDialogBox mainCenter" :visible.sync="dialogVisible" width="85%">
<el-dialog :close-on-click-modal="false" top="0" @close="closeDialog" custom-class="dialogBox editDialogBox mainCenter"
:visible.sync="dialogVisible" width="85%">
<div slot="title" class="dialog_title" ref="dialogTitle">
{{ title || '标题' }}
</div>
......@@ -96,6 +95,10 @@
<component :is="editItem" ref="editItem" :class="{ 'editForm': $store.state.business.Edit }"
:bsmYwsjb="bsmYwsjb" :bsmSjsb="dataReport.bsmReport || dataReport.bsmSjsb" />
</div>
<div class="d-center" v-if="!$store.state.business.Edit">
<btn nativeType="cz" @click="dialogVisible = false">取 消</btn>
<btn nativeType="cx" @click="submitForm">确 定</btn>
</div>
</div>
<div v-if="titleName == 'xyjg'">
<Xyjg :form-data='dataReport'></Xyjg>
......@@ -160,7 +163,6 @@ export default {
digitalSign: "",
},
images: require("./images/success.gif"),
saveloding: false,
dialogVisible: false,
activeName: undefined,
editItem: "",
......@@ -234,51 +236,25 @@ export default {
this.headerList = [];
},
submitForm () {
let _this = this;
this.$store.dispatch(
"business/setRules",
this.$store.state.business.subRules
);
this.$nextTick(() => {
this.$refs["editItem"] &&
this.$refs["editItem"].verificationForm().then((res) => {
if (!res) {
_this.$message({
message: "请检查表单必填项是否完整",
type: "warning",
});
return false;
} else {
_this.saveloding = true;
_this.$refs["editItem"]
.handleUpdateForm()
.then((res) => {
if (res == 200) {
_this.$alert(
'<p><img class="success-images" src="' +
this.images +
'"/>编辑成功!</p>',
"提示",
{
showConfirmButton: false,
dangerouslyUseHTMLString: true,
}
);
setTimeout(() => {
MessageBox.close(false);
}, 1500);
}
})
.catch(function (error) {
_this.$alert(error, "提示", {
confirmButtonText: "确定",
type: "error",
});
});
_this.saveloding = false;
}
});
});
// this.$store.dispatch(
// "business/setRules",
// this.$store.state.business.subRules
// );
this.$refs["editItem"].handleUpdateForm()
.then((res) => {
if (res == 200) {
this.$message({
message: '修改成功',
type: 'success'
})
}
})
.catch(function (error) {
this.$alert(error, "提示", {
confirmButtonText: "确定",
type: "error"
})
})
}
}
}
......@@ -315,6 +291,8 @@ export default {
}
.sjmx {
padding-bottom: 25px;
/deep/.el-tabs__item {
height: 50px;
padding-top: 6px;
......@@ -390,7 +368,7 @@ export default {
}
.edit-content {
height: 450px;
height: 420px;
overflow-y: auto;
overflow-x: hidden;
padding-right: 1px;
......
<template>
<el-input type="textarea" :rows="6" disabled placeholder="配置参数" v-model="resultInfo">
</el-input>
<div>
<el-input type="textarea" :rows="6" :disabled="$store.state.business.Edit" placeholder="配置参数" v-model="resultInfo">
</el-input>
<div class="d-center" v-if="!$store.state.business.Edit">
<btn nativeType="cz" @click="dialogVisible = false">取 消</btn>
<btn nativeType="cx" @click="submitForm">确 定</btn>
</div>
</div>
</template>
<script>
// 引入json编译器
......@@ -29,7 +35,7 @@ export default {
<style scoped lang="scss">
/* jsoneditor右上角默认有一个链接,加css去掉了 */
/deep/.el-textarea__inner {
min-height: 73vh !important;
min-height: 76vh !important;
background-color: #08346F !important;
color: #ffffff;
border: none !important;
......
import Vue from 'vue'
// 下载,导出
Vue.prototype.$download = function(name, href) {
Vue.prototype.$download = function (name, href) {
var a = document.createElement('a') // 创建a标签
var e = document.createEvent('MouseEvents') // 创建鼠标事件对象
e.initEvent('click', false, false) // 初始化事件对象
......@@ -10,7 +10,7 @@ Vue.prototype.$download = function(name, href) {
a.dispatchEvent(e) // 给指定的元素,执行事件click事件
}
// 导出json文件
Vue.prototype.$downloadJson = function(data, name) {
Vue.prototype.$downloadJson = function (data, name) {
// 1 生成文件的 blob 对象
const blobData = new Blob([JSON.stringify(data)], {
type: 'application/octet-stream'
......@@ -84,7 +84,7 @@ const checkCode = (rule, value, callback) => {
// }
// }
// 日期格式转换 "yyyy-MM-dd HH:mm:ss"
Vue.prototype.$formdate = function(date) {
Vue.prototype.$formdate = function (date) {
if (!date) {
return ""
}
......@@ -95,22 +95,22 @@ Vue.prototype.$formdate = function(date) {
var hh = (d.getHours() < 10 ? '0' + d.getHours() : d.getHours()) + ':';
var mm = (d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes()) + ':';
var ss = (d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds());
return YY + MM + DD +" "+hh + mm + ss
return YY + MM + DD + " " + hh + mm + ss
}
// 时间格式过滤
Vue.filter('timeFilter', function(timeStr) {
Vue.filter('timeFilter', function (timeStr) {
if (timeStr) {
return timeStr.substring(0, 10)
}
})
export function getType(o) {
export function getType (o) {
return Object.prototype.toString.call(o).slice(8, -1)
}
export function isKeyType(o, type) {
export function isKeyType (o, type) {
return getType(o).toLowerCase() === type.toLowerCase()
}
// 深拷贝全局挂载
Vue.prototype.$deepCopy = function(sth) {
Vue.prototype.$deepCopy = function (sth) {
// 深度复制数组
// if (Object.prototype.toString.call(obj) === "[object Array]") {
// const object = [];
......@@ -196,7 +196,7 @@ Vue.prototype.$dealArrNotDisabled = arr => {
}
}
}
function nodeDeal(arr) {
function nodeDeal (arr) {
arr.forEach(item => {
delete item.disabled
if (item.children) {
......@@ -222,7 +222,7 @@ Vue.prototype.$dealArrDisabled = (arr, id) => {
}
}
}
function nodeDeal(arr) {
function nodeDeal (arr) {
arr.forEach(item => {
item['disabled'] = true
if (item.children) {
......@@ -249,10 +249,9 @@ Vue.prototype.$getNodeRoute = (val, id) => {
}
}
})
function nodefun(newVal, newId, newCid_list) {
function nodefun (newVal, newId, newCid_list) {
let flag = false
newVal.forEach(j => {
// console.log(j)
if (j.id === newId) {
newCid_list.push(j.id)
flag = true
......@@ -272,7 +271,7 @@ Vue.prototype.$getNodeRoute = (val, id) => {
return newCid_list
}
}
function result(cid_list) {
function result (cid_list) {
const arr = cid_list.concat()
arr.pop()
return arr
......@@ -325,7 +324,7 @@ Vue.prototype.$findParent = (list, id) => {
Vue.prototype.$findChildren = (list, nodeId) => {
let newArray = []
let flag = false
function dealList(list, nodeId) {
function dealList (list, nodeId) {
if (list.length !== 0) {
list.forEach(item => {
if (!flag) {
......
......@@ -46,7 +46,7 @@ class data extends filter {
{
prop: "bizMsgid",
label: "业务报文ID",
width: 90,
width: 98,
},
{
prop: "createdate",
......
......@@ -25,7 +25,7 @@
<el-form-item>
<btn nativeType="cz" @click="handleResetForm">重置</btn>
<btn nativeType="cx" @click="handleSearch">查询</btn>
<btn nativeType="cx" @click="handlesetExport2Excel(2121)">导出</btn>
<btn nativeType="cx" @click="handlesetExport2Excel(2121)">导出1</btn>
</el-form-item>
</el-col>
</el-row>
......@@ -33,9 +33,8 @@
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-table ref="table" :id="'mytable'" :page-size="pageData.size" :header-cell-style="headerStyle"
:current-page.sync="pageData.current" :total="tableData.total" @size-change="handleSizeChange"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
<lb-table ref="table" :id="'mytable'" :header-cell-style="headerStyle" :pagination="false"
:column="tableData.columns" :data="tableData.data">
</lb-table>
</div>
</div>
......@@ -105,13 +104,7 @@ export default {
}
]
.concat(data.columns()),
data: [],
},
// 分页
pageData: {
total: 0,
pageSize: 10,
current: 1
data: []
}
}
},
......@@ -119,6 +112,7 @@ export default {
this.handleResetForm()
},
methods: {
handleSearch () { },
headerStyle ({ row, rowIndex }) {
if (rowIndex == 3) {
row[2].rowSpan = 2;
......
......@@ -34,9 +34,7 @@
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-table ref="table" :page-size="pageData.size" :id="'mytable'" :current-page.sync="pageData.current"
:total="tableData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
:column="tableData.columns" :data="tableData.data">
<lb-table ref="table" :id="'mytable'" :pagination="false" :column="tableData.columns" :data="tableData.data">
</lb-table>
</div>
</div>
......@@ -107,12 +105,6 @@ export default {
]
.concat(data.columns()),
data: [],
},
// 分页
pageData: {
total: 0,
pageSize: 10,
current: 1
}
};
},
......@@ -120,6 +112,7 @@ export default {
this.handleResetForm()
},
methods: {
handleSearch () { },
handlesetExport2Excel (val) {
setExport2Excel(val)
},
......
......@@ -33,9 +33,7 @@
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-table ref="table" :id="'mytable'" :page-size="pageData.size" :current-page.sync="pageData.current"
:total="tableData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
:column="tableData.columns" :data="tableData.data">
<lb-table ref="table" :id="'mytable'" :pagination="false" :column="tableData.columns" :data="tableData.data">
</lb-table>
</div>
</div>
......@@ -106,19 +104,14 @@ export default {
]
.concat(data.columns()),
data: [],
},
// 分页
pageData: {
total: 0,
pageSize: 10,
current: 1
},
}
}
},
created () {
this.handleResetForm()
},
methods: {
handleSearch () { },
handlesetExport2Excel (val) {
setExport2Excel(val)
},
......
......@@ -79,7 +79,7 @@
<!-- 引入详情组件 -->
<!-- 编辑 -->
<dataDetails ref="editLog" :title="title" :visiableXml="true" />
</div>
</div>
</template>
<script>
// 上报报文查询
......@@ -201,6 +201,11 @@ export default {
handleDetail (row) {
this.title = row.rectypeName;
this.$refs.editLog.isShow(row);
if (row.exchangeState == 2) {
this.$store.dispatch('business/setReportLogEdit')
} else {
this.$store.dispatch('business/setEdit')
}
},
// 重置
resetForm () {
......
<template>
<Dialog :title="title" class="tableClass" :show.sync="visible" :width="'715px'" @close="close()">
<template slot="content">
<lb-table ref="multipleTable"
:pagination="false"
:column="tableData.column"
:data="tableData.data"
@selection-change="handleSelectionChange">
</lb-table>
</template>
<template slot="footer">
<el-button type="primary" class="save" @click="handleSaveMember()"
>保存</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 {
title: "人员配置",
visible: false,
tableData: {
column: [
{
type: 'selection'
},
{
prop: 'name',
label: '角色名称'
},
{
prop: 'type',
label: '角色类型'
},
{
prop: 'departmentName',
label: '角色描述'
},
],
data: [
{
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,
type:"",
code: "123324",
jobLevel: null,
telephone: "028-87720898",
address: "办公地点修改测试",
isLocked: false,
departmentName: "研发部",
_X_ROW_KEY: "row_276",
},
{
name: '数据管理员',
type:"1",
},
{
name: '数据管理员2',
type:"d",
}
]
},
multipleSelection: []
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
authorization() {
this.visible = true;
},
close() {
// this.resetForm()
this.visible = false;
},
// 保存事件
handleSaveMember() {
// if (this.memberList.length === 0) {
// this.$message.warning("请添加待选人员");
// return false;
// }
// const idList = this.memberList.map(item => item.id)
// updateUser(this.roleId, idList).then(res => {
// if (res.status === 1) {
// this.$message.success({ message: '保存成功', showClose: true })
// this.showMemberConfigDialog = false
// this.$emit('setUsers', this.roleId)
// this.resetMemberConfig()
// } else this.$message.error({ message: res.message, showClose: true })
// })
},
handleSelectionChange (val) {
this.multipleSelection = val
}
}
};
</script>
<style scoped lang="scss">
/deep/.el-dialog__header{
text-align: center;
margin-bottom: 10px;
.el-dialog__title{
color: white;
}
}
</style>
......@@ -166,6 +166,7 @@ export default {
methods: {
// 获取父级菜单
getParentMenuList(id) {
getParentMenuListAction(id).then((res) => {
if (res.status === 1) {
const list = this.$dealArrChildren(res.content)
......@@ -195,7 +196,7 @@ export default {
},
// 新增菜单
add() {
this.getParentMenuList(this.productId)
this.getParentMenuList("2925fdeb-ddeb-4c15-8ee0-7bc3aa75ec2b")
this.visible = true
this.type = 0
this.form.jumpMode = 1
......