Commit 58bc35df by 米嘉伟

Merge branch 'dev_zwpt' of http://47.92.108.28/changchao/founder_vue into dev_zwpt

parents f249c8fe 192aec0a
<!--
* @Author: your name
* @Date: 2021-09-07 09:58:13
* @LastEditTime: 2021-11-06 15:23:43
* @LastEditTime: 2021-11-09 16:21:40
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\App.vue
......@@ -40,4 +40,12 @@ export default {
padding: 0;
box-sizing: border-box;
}
@font-face {
font-family: 'MicrosoftYaHei-Bold';
src: url('../src/assets/font/MSYHBD.ttf') format('truetype');
}
@font-face {
font-family: 'MicrosoftYaHei';
src: url('../src/assets/font/MSYH.ttf') format('truetype');
}
</style>
......@@ -59,7 +59,7 @@ $width: 1210px;
body {
line-height: 1.8;
font-family: 'Helvetica Neue', Helvetica, 'Microsoft Yahei', 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
font-family: 'Helvetica Neue', Helvetica, 'MicrosoftYaHei', 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
background-color: #f7f7f7;
font-size: $ns-font-size-base;
color: $ns-text-color-black;
......
......@@ -779,7 +779,7 @@ div {
width: 56px;
height: 19px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
}
.right {
......@@ -787,7 +787,7 @@ div {
width: 28px;
height: 19px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ff3644;
}
}
......@@ -873,7 +873,7 @@ div {
// height: 19px;
margin-top: 8px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #999;
}
}
......@@ -896,7 +896,7 @@ div {
// height: 19px;
margin-top: 8px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #999;
}
}
......@@ -1311,7 +1311,7 @@ div {
align-items: center;
.tui-image-editor {
width: 520px;
height: 520px!important;
height: 520px !important;
display: flex;
align-items: center;
justify-content: center;
......@@ -1392,7 +1392,7 @@ div {
align-items: center;
.tui-image-editor {
width: 520px;
height: 520px!important;
height: 520px !important;
display: flex;
align-items: center;
justify-content: center;
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-10-23 11:30:51
* @LastEditTime: 2021-11-09 17:33:31
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\plugins\axios.js
......@@ -13,6 +13,9 @@ import axios from "axios";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import store from "../store";
import { Loading } from 'element-ui';
var loadingIndex = 0;
var loadingBoo;
// Full config: https://github.com/axios/axios#request-config
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
......@@ -28,12 +31,18 @@ let config = {
// Authorization: localStorage.getItem("token") || ""
// }
};
const _axios = axios.create(config);
var loading;
_axios.interceptors.request.use(
function(config) {
function (config) {
loadingBoo = (!config.loading && typeof config.loading == 'boolean') ? config.loading : true;
// debugger;
// 进度条
if (loadingBoo) {
if (!loading) loading = Loading.service({ fullscreen: true, text: '正在加载...' });
loadingIndex++;
}
NProgress.start();
// 在发送请求之前做些什么
// 判断是否存在token,如果存在将每个页面header添加token
......@@ -42,7 +51,7 @@ _axios.interceptors.request.use(
}
return config;
},
function(error) {
function (error) {
NProgress.start();
// Do something with request error
return Promise.reject(error);
......@@ -51,8 +60,13 @@ _axios.interceptors.request.use(
// Add a response interceptor
_axios.interceptors.response.use(
function(response) {
function (response) {
NProgress.done();
if (loadingBoo) loadingIndex--;
if (loadingIndex == 0) {
loading && loading.close();
loading = null
}
if (response.data.code === 401) {
localStorage.removeItem("token"); //删除名称为“token”的信息。
localStorage.removeItem("userName"); //删除名称为“userName”的信息。
......@@ -60,14 +74,19 @@ _axios.interceptors.response.use(
}
return response;
},
function(error) {
function (error) {
NProgress.done();
if (loadingBoo) loadingIndex--;
if (loadingIndex == 0) {
loading && loading.close();
loading = null;
}
// Do something with response error
return Promise.reject(error);
}
);
Plugin.install = function(Vue) {
Plugin.install = function (Vue) {
Vue.axios = _axios;
window.axios = _axios;
Object.defineProperties(Vue.prototype, {
......
......@@ -5,7 +5,7 @@
box-sizing: border-box;
.title {
font-size: 16px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
font-weight: bold;
color: #333333;
}
......@@ -62,12 +62,12 @@
align-items: center;
justify-content: center;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
&.active {
background: #055fe7;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ffffff;
}
}
......@@ -164,7 +164,7 @@
right: 5px;
bottom: 5px;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
display: flex;
justify-content: center;
......@@ -173,7 +173,7 @@
}
.finger-name {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
}
}
......
......@@ -720,7 +720,7 @@ $transOrigin: var(--transOrigin, 0px, 0px);
width: 56px;
height: 19px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
}
.right {
......@@ -728,7 +728,7 @@ $transOrigin: var(--transOrigin, 0px, 0px);
width: 28px;
height: 19px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ff3644;
}
}
......@@ -814,7 +814,7 @@ $transOrigin: var(--transOrigin, 0px, 0px);
// height: 19px;
margin-top: 8px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #999;
}
}
......@@ -837,7 +837,7 @@ $transOrigin: var(--transOrigin, 0px, 0px);
// height: 19px;
margin-top: 8px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #999;
}
}
......@@ -909,7 +909,7 @@ $transOrigin: var(--transOrigin, 0px, 0px);
.title {
position: absolute;
font-size: 20px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
left: 24px;
top: 2px;
......@@ -981,7 +981,7 @@ $transOrigin: var(--transOrigin, 0px, 0px);
justify-content: center;
align-items: center;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ffffff;
&:hover {
background: #377fec;
......
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-06 15:12:14
* @LastEditTime: 2021-11-09 17:26:00
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
......@@ -988,11 +988,18 @@ export default {
self.isReset = true
// 旋转角度同样恢复到0
self.inputRotationRange = 0
console.log(self.startPlace,222);
// 事件不能连续重复执行,需要缓存时间
self.startPlace = 0;
setTimeout(() => {
imageEditor.setAngle(0)['catch'](function () { });
console.log(11111,-self.startPlace)
imageEditor.rotate(-parseInt(self.startPlace))
imageEditor.resetZoom();
self.startPlace = 0;
}, 200);
//重置位置变量
self.move_left = 0;
self.move_top = 0;
self.zoomLevel = 1;
imageEditor.resetFlip().then(function (status) {
console.log('flipX: ', status.flipX);
console.log('flipY: ', status.flipY);
......@@ -1000,6 +1007,14 @@ export default {
});
$('.tzdDrawing').css('transform', 'rotateX(0)')
$('.tzdDrawing').css('transform', 'rotateY(0)')
// 移动图片
// imageEditor._graphics.setImageProperties({
// left: 0,
// top: 0,
// originX: 'left',
// originY: 'top'
// }, true)
});
// 向左旋转30°
......@@ -1011,6 +1026,16 @@ export default {
self.historys.push('旋转')
let canvasImage = imageEditor._graphics.getCanvasImage()
$('.tzdDrawing').css('transform', `rotate(${canvasImage.angle}deg)`);
// 每次旋转时,位置都会改变,需要重新定位
if (self.move_left && self.move_top) {
imageEditor._graphics.setImageProperties({
left: self.move_left + canvasImage.left,
top: self.move_top + canvasImage.top,
originX: 'left',
originY: 'top'
}, true)
}
});
// 向右旋转30°
$btnRotateCounterClockWise.on('click', function () {
......@@ -1021,6 +1046,16 @@ export default {
let canvasImage = imageEditor._graphics.getCanvasImage()
$('.tzdDrawing').css('transform', `rotate(${canvasImage.angle}deg)`)
self.historys.push('旋转')
// 每次旋转时,位置都会改变,需要重新定位
if (self.move_left && self.move_top) {
imageEditor._graphics.setImageProperties({
left: self.move_left + canvasImage.left,
top: self.move_top + canvasImage.top,
originX: 'left',
originY: 'top'
}, true)
}
});
// 滑动旋转事件
$inputRotationRange.on('mousedown', function () {
......@@ -1383,6 +1418,9 @@ export default {
$('.tzdDrawing').css('transform', `translate(${Number(self.tzdDrawingLeft) + (x2 - x1)}px,${Number(self.tzdDrawingTop) + (y2 - y1)}px) scale(${self.zoomLevel})`)
self.move_left = originleft + ((x2 - x1) * self.newWidth / self.canvasWidth / self.zoomLevel)
self.move_top = origintop + ((y2 - y1) * self.newHeight / self.canvasHeight / self.zoomLevel)
// $('.tzdDrawing').css('transform', `translate(${(originleft + (x2 - x1))/16}rem,${(origintop + (y2 - y1))/16}rem) scale(${self.zoomLevel})`)
}
// console.log(self.mouseEnlarge);
......@@ -1573,7 +1611,8 @@ export default {
if (flag) {
let res = await this.$axios({
method: 'get',
url: '/api/export/trait/xml/person/' + this.barcode + '/' + this.seq
url: '/api/export/trait/xml/person/' + this.barcode + '/' + this.seq,
loading: false
// url: 'http://www.meetfood.cn:2390/traint/export/xml/trait/' + this.barcode + '/' + this.seq
})
console.log(res);
......@@ -1819,7 +1858,8 @@ export default {
async directionChange () {
let res = await this.$axios({
method: 'get',
url: '/api/traint/export/xml/trait/' + this.barcode + '/' + this.seq
url: '/api/traint/export/xml/trait/' + this.barcode + '/' + this.seq,
loading: false
})
console.log(res);
let deg = res.data.fpt5FingerMsg.zwfx_tzfx
......@@ -1872,11 +1912,38 @@ export default {
* @return {*}
*/
OriginalChange () {
let self = this;
self.isX = false
self.isY = false
self.isReset = true
// 旋转角度同样恢复到0
self.inputRotationRange = 0
// 事件不能连续重复执行,需要缓存时间
setTimeout(() => {
self.imageEditor.rotate(-parseInt(self.startPlace))
self.imageEditor.resetZoom();
self.startPlace = 0;
}, 200);
//重置位置变量
self.move_left = 0;
self.move_top = 0;
self.zoomLevel = 1;
self.imageEditor.resetFlip().then(function (status) {
console.log('flipX: ', status.flipX);
console.log('flipY: ', status.flipY);
console.log('angle: ', status.angle);
});
$('.tzdDrawing').css('transform', 'rotateX(0)')
$('.tzdDrawing').css('transform', 'rotateY(0)')
this.issize = true
this.ismoderate = false
this.imageEditor.resetZoom()
// 特征点图层缩放设置为1
$('.tzdDrawing').css('transform', 'scale(1)');
// this.imageEditor.resetZoom()
// self.zoomLevel = 1;
// this.imageEditor.rotate(-parseInt(-self.startPlace));
// self.startPlace = 0;
// // 特征点图层缩放设置为1
// $('.tzdDrawing').css('transform', 'scale(1)');
},
/**
* @description: 取消删除按钮
......@@ -2398,7 +2465,7 @@ export default {
// this.$store.commit('zwbj/setTzdall', self.tzdall)
let fpt5TraitMinutiaList = {
fpt5TraitMinutiaList: self.tzdall,
zwzwdm: self.seq>9?self.seq:('0'+self.seq)
zwzwdm: self.seq > 9 ? self.seq : ('0' + self.seq)
}
console.log(fpt5TraitMinutiaList);
console.log(qs.stringify(fpt5TraitMinutiaList));
......@@ -2410,7 +2477,8 @@ export default {
},
// url: 'http://www.meetfood.cn:2390/traint/upload/persontrait?barcode=' + self.barcode + '&seq=' + self.seq,
url: '/api/upload/trait/person?barcode=' + self.barcode + '&seq=' + self.seq,
data: JSON.stringify(fpt5TraitMinutiaList)
data: JSON.stringify(fpt5TraitMinutiaList),
loading: false
}).then(res => {
console.log(res);
if (res.data.message == 'success') {
......@@ -2789,25 +2857,27 @@ export default {
this.isOptions = !this.isOptions
this.isActive = !this.isActive
if (this.isActive) {
//重置图像大小,旋转方向的方法
this.OriginalChange();
$('.icon_size').css('background', '#055FE7')
// 是否原尺寸同步
this.isSizeSynchro = false
// 是否展示原尺寸同步下拉框
this.isShowSizeSynchro = true
this.imageEditor.resetZoom()
this.imageEditor.changeCursor('auto');
this.isShowsizeOptions = true
this.issize = true
this.ismoderate = false
// 特征点图层缩放设置为1
$('.tzdDrawing').css('transform', 'scale(1)');
// 移动图片
this.imageEditor._graphics.setImageProperties({
left: 0,
top: 0,
originX: 'left',
originY: 'top'
}, true)
// // 是否原尺寸同步
// this.isSizeSynchro = false
// 是否展示原尺寸同步下拉框
// this.imageEditor.resetZoom()
// this.imageEditor.changeCursor('auto');
// // 移动图片
// this.imageEditor._graphics.setImageProperties({
// left: 0,
// top: 0,
// originX: 'left',
// originY: 'top'
// }, true)
} else {
$('.icon_size').css('background', 'rgba(5, 95, 231, 0.05)')
// 是否原尺寸同步
......
......@@ -781,7 +781,7 @@ $directionRotate: var(--directionRotate, 0deg);
.title {
position: absolute;
font-size: 20px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
left: 24px;
top: 2px;
......@@ -979,7 +979,7 @@ $directionRotate: var(--directionRotate, 0deg);
justify-content: center;
align-items: center;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ffffff;
&:hover {
background: #377fec;
......@@ -1488,7 +1488,7 @@ $directionRotate: var(--directionRotate, 0deg);
width: 56px;
height: 19px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
}
.right {
......@@ -1496,7 +1496,7 @@ $directionRotate: var(--directionRotate, 0deg);
width: 28px;
height: 19px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ff3644;
}
}
......@@ -1582,7 +1582,7 @@ $directionRotate: var(--directionRotate, 0deg);
// height: 19px;
margin-top: 8px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #999;
}
}
......@@ -1605,7 +1605,7 @@ $directionRotate: var(--directionRotate, 0deg);
// height: 19px;
margin-top: 8px;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #999;
}
}
......
......@@ -5,7 +5,7 @@
box-sizing: border-box;
.title {
font-size: 16px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
font-weight: bold;
color: #333333;
}
......@@ -44,12 +44,12 @@
align-items: center;
justify-content: center;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
&.active {
background: #055fe7;
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ffffff;
}
}
......@@ -141,7 +141,7 @@
right: 5px;
bottom: 5px;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
display: flex;
justify-content: center;
......@@ -150,7 +150,7 @@
}
.finger-name {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
}
}
......
<!--
* @Author: your name
* @Date: 2021-10-22 09:42:07
* @LastEditTime: 2021-11-05 13:07:42
* @LastEditTime: 2021-11-09 17:29:05
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue
......@@ -255,7 +255,8 @@ export default {
let self = this
this.$axios({
method: 'get',
url: `/api/org/roll/${self.id}/${seq}?mnt=1`
url: `/api/org/roll/${self.id}/${seq}?mnt=1`,
loading: false
// url: `/api/org/roll/${1}/${seq}?mnt=1`
}).then(res => {
// console.log(res);
......@@ -282,7 +283,8 @@ export default {
let self = this
this.$axios({
method: 'get',
url: `/api/org/plain/${self.id}/${seq}?mnt=1`
url: `/api/org/plain/${self.id}/${seq}?mnt=1`,
loading: false
// url: `/api/org/plain/${1}/${seq}?mnt=1`
}).then(res => {
// console.log(res);
......@@ -314,7 +316,8 @@ export default {
})
let res = await this.$axios({
method: 'get',
url: '/api/org/roll/'+self.id+'?mnt=1'
url: '/api/org/roll/'+self.id+'?mnt=1',
loading: false
// url: '/api/png/roll/1?mnt=1'
})
// console.log(res);
......@@ -355,7 +358,8 @@ export default {
})
let res = await this.$axios({
method: 'get',
url: '/api/org/plain/'+self.id+'?mnt=1'
url: '/api/org/plain/'+self.id+'?mnt=1',
loading: false
// url: '/api/png/plain/1?mnt=1'
})
// console.log(res);
......
......@@ -159,10 +159,9 @@ export default {
rightImg: require("../assets/img/Home/right.png"),
paths: [],
menuActive: "",
isHoverLogout: false
isHoverLogout: false,
};
},
created() {},
mounted() {
this.menuActive = this.$route.name;
// console.log(this.$route);
......@@ -175,7 +174,7 @@ export default {
this.menuActive = this.$route.name;
},
computed: {
...mapGetters(["defaultGoodsImage", "userAuth"])
...mapGetters(["defaultGoodsImage", "userAuth"]),
},
methods: {
/**
......@@ -189,7 +188,7 @@ export default {
// this.$router.replace('/login1')
this.$axios
.post("/login/login/userLogout")
.then(res => {
.then((res) => {
if (res.data.code === 200) {
localStorage.removeItem("token"); //删除名称为“token”的信息。
localStorage.removeItem("userName"); //删除名称为“userName”的信息。
......@@ -197,7 +196,7 @@ export default {
this.$message.info("退出成功!");
}
})
.catch(err => {
.catch((err) => {
console.info(err);
});
},
......@@ -235,7 +234,7 @@ export default {
* @return {*}
*/
closePaths(pathName) {
let res = this.paths.filter(item => {
let res = this.paths.filter((item) => {
return item.name != pathName;
});
this.paths = res;
......@@ -267,30 +266,42 @@ export default {
},
handleClose(key, keyPath) {
console.log(key, keyPath);
}
},
},
watch: {
$route(newValue, oldValue) {
if (newValue.path != "/Home/htzwcj") {
if (this.paths.length == 0) {
this.paths.push({
name: newValue.meta.title,
path: newValue.path,
routeName: newValue.name
});
} else {
let obj = {
name: newValue.meta.title,
path: newValue.path,
routeName: newValue.name
};
if (JSON.stringify(this.paths).indexOf(JSON.stringify(obj)) === -1) {
this.paths.push(obj);
$route: {
handler(newValue, oldValue) {
setTimeout(() => {
console.log(1);
if (newValue.path != "/Home/htzwcj") {
if (this.paths.length == 0) {
this.paths.push({
name: newValue.meta.title,
path: newValue.path,
routeName: newValue.name,
});
} else {
let obj = {
name: newValue.meta.title,
path: newValue.path,
routeName: newValue.name,
};
if (
JSON.stringify(this.paths).indexOf(JSON.stringify(obj)) === -1
) {
this.paths.push(obj);
}
}
}
}
}
}
}
sessionStorage.setItem("crumbs", JSON.stringify(this.paths));
}, 0);
},
immediate: true,
},
},
created() {
this.paths = sessionStorage.getItem("crumbs") ? JSON.parse(sessionStorage.getItem("crumbs")) : [];
},
};
</script>
<style scoped lang="scss">
......
......@@ -181,6 +181,9 @@ export default {
}
});
}
},
created(){
sessionStorage.setItem('crumbs',[])
}
};
</script>
......
......@@ -16,7 +16,7 @@
style="height: .9375rem;width: .9375rem;margin-left:.0625rem ;margin-top: .25rem"
/>
</div>
<div class="img-btn" @click="del">
<div class="img-btn" @click="del(diyRoleItemIndex)">
<img
src="../../assets/img/role/delete.png"
style="height: .9375rem;width: .9375rem;margin-left:.0625rem ;margin-top: .25rem"
......@@ -29,10 +29,26 @@
v-for="(item, index) in defaultRoleBtns"
:key="index"
:class="{ active: item.flag }"
@click="chooseDefaultRoleItem(index)"
>
{{ item.name }}
</div>
</div>
<div class="diy-roles">
<div
class="diy-role-item"
v-for="(item, index) in diyRoleList"
:key="index"
:class="{ active: item.flag === true }"
@click="chooseDiyRoleItem(index)"
>
{{ item.name }}
<!-- <div class="diy-edit-title">{{ item.name }}</div>-->
<div class="diy-edit-btn">
<img class="img" :src="editurl" @click="editDiyRoleItem(index)" />
</div>
</div>
</div>
</div>
<div class="main">
<div class="header">
......@@ -46,10 +62,10 @@
</div>
<div class="save">
<div class="btn" @click="save">保存</div>
<el-button @click="add">add</el-button>
<el-button @click="edit">edit</el-button>
<el-button @click="del">del</el-button>
<el-button @click="search">search</el-button>
<!-- <el-button @click="add">add</el-button>-->
<!-- <el-button @click="edit">edit</el-button>-->
<!-- <el-button @click="del">del</el-button>-->
<!-- <el-button @click="search">search</el-button>-->
</div>
</div>
<div class="role-info">
......@@ -193,6 +209,7 @@ export default {
data() {
return {
// 功能权限标志 数据权限标志
editurl: require("@/assets/img/edit.png"),
funFlag: false,
dataFlag: false,
// 角色按钮
......@@ -308,8 +325,11 @@ export default {
{ name: "本地重卡反馈", code: 14, flag: false },
{ name: "本地涉案反馈", code: 15, flag: false }
],
// 角色权限选项
roleMenusSelection: []
// 保存的角色选项
roleMenusSelection: [],
// 自定义的角色组
diyRoleList: [],
diyRoleItemIndex: -1
};
},
methods: {
......@@ -335,32 +355,39 @@ export default {
.catch(failResponse => {});
},
// 删除
del() {
console.info("删除数据");
var sysRole = new URLSearchParams();
sysRole.append("roleId", "16");
this.$axios
.post("/login/role/deleteRoleById", sysRole)
.then(res => {})
.catch(failResponse => {});
del(id) {
console.info("删除数据", id);
this.diyRoleList.splice(id, 1);
// var sysRole = new URLSearchParams();
// sysRole.append("roleId", "16");
// this.$axios
// .post("/login/role/deleteRoleById", sysRole)
// .then(res => {})
// .catch(failResponse => {});
},
// 新增
add() {
var roleitem = {
name: "自定义" + (this.diyRoleList.length + 1),
flag: false,
code: this.diyRoleList.length
};
this.diyRoleList.push(roleitem);
console.info("新增数据");
var role = new URLSearchParams();
role.append("roleName", "角色名");
role.append("description", "角色描述");
// var role = new URLSearchParams();
// role.append("roleName", "角色名");
// role.append("description", "角色描述");
// sffb; //(是否发布:0:未发布,1:已发布),
// pid; // (父级角色的id),
// isparent; //(是否是父级:0:父级,1:子级),
// type角色类型;
this.$axios
.post("/login/role/add", role)
.then(res => {
console.log(res);
this.$message.success(res.message);
})
.catch(failResponse => {});
// this.$axios
// .post("/login/role/add", role)
// .then(res => {
// console.log(res);
// this.$message.success(res.message);
// })
// .catch(failResponse => {});
},
// 编辑
edit() {
......@@ -382,6 +409,32 @@ export default {
.then(res => {})
.catch(failResponse => {});
},
// 选中默认权限
chooseDefaultRoleItem(index) {
this.defaultRoleBtns.forEach((roleitem, idx) => {
if (idx === index) {
roleitem.flag = true;
} else {
roleitem.flag = false;
}
});
},
// 选中自定义某个权限
chooseDiyRoleItem(index) {
this.diyRoleItemIndex = index;
this.diyRoleList.forEach((roleitem, idx) => {
if (idx === index) {
roleitem.flag = true;
} else {
roleitem.flag = false;
}
});
// this.diyRoleList[index].flag = true;
},
// 编辑
editDiyRoleItem(id) {
console.info("编辑方法");
},
funAuth() {
this.funFlag = true;
this.dataFlag = false;
......
......@@ -77,6 +77,54 @@
}
}
}
.diy-roles{
//border: saddlebrown 1px solid;
width: 215px;
height: 366px;
display: flex;
flex-direction: column;
padding-top: 10px;
overflow:scroll;
.diy-role-item{
width: 190px;
height: 40px;
border-radius: 4px;
border: 1px solid #AEB5C2;
font-size: 14px;
color: #333333;
line-height: 40px;
margin-bottom: 10px;
cursor: pointer;
overflow: hidden;
&.active{
border: 1px solid #055FE7;
color: #055FE7;
}
.diy-edit-title{
//border: saddlebrown 1px solid;
height: 19px;
font-size: 14px;
color: #333333;
line-height: 19px;
}
.diy-edit-btn{
width: 40px;
height: 30px;
background: #DDEBFF;
box-shadow: 0px 0px 4px 0px rgba(5, 95, 231, 0.3);
border-bottom-left-radius:250px;
position: relative;
right: -55px;
top: -3px;
.img{
width: 13px;
height: 14px;
margin-bottom:13px;
cursor: pointer;
}
}
}
}
}
.main {
width: 100%;
......
......@@ -652,7 +652,7 @@ b {
width: fit-content;
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-family: MicrosoftYaHei;
font-weight: 350;
color: #055fe7;
line-height: 16px;
......
......@@ -33,7 +33,7 @@ $phone: var(--phone, #606266); //#ff4242;
align-items: center;
.title {
font-size: 16px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.rdwcbtns {
......@@ -113,7 +113,7 @@ $phone: var(--phone, #606266); //#ff4242;
padding: 14px 32px;
.left {
font-size: 16px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.close {
......@@ -127,7 +127,7 @@ $phone: var(--phone, #606266); //#ff4242;
}
.bzdesc {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
.bz-source {
width: 743px;
......@@ -197,7 +197,7 @@ $phone: var(--phone, #606266); //#ff4242;
bottom: -24px;
right: 36px;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #FF3745;
}
.input-error {
......@@ -242,7 +242,7 @@ $phone: var(--phone, #606266); //#ff4242;
width: 100%;
.footer-title {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
/deep/.el-textarea {
width: 100%;
......
......@@ -33,7 +33,7 @@ $phone: var(--phone, #606266); //#ff4242;
align-items: center;
.title {
font-size: 16px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.rdwcbtns {
......@@ -113,7 +113,7 @@ $phone: var(--phone, #606266); //#ff4242;
padding: 14px 32px;
.left {
font-size: 16px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.close {
......@@ -127,7 +127,7 @@ $phone: var(--phone, #606266); //#ff4242;
}
.bzdesc {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
.bz-source {
width: 743px;
......@@ -198,7 +198,7 @@ $phone: var(--phone, #606266); //#ff4242;
bottom: -24px;
right: 36px;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #ff3745;
}
.input-error {
......@@ -242,7 +242,7 @@ $phone: var(--phone, #606266); //#ff4242;
width: 100%;
.footer-title {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
/deep/.el-textarea {
width: 100%;
......
......@@ -34,7 +34,7 @@ $phone: var(--phone, #606266); //#ff4242;
align-items: center;
.title {
font-size: 16px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.rdwcbtns {
......@@ -111,7 +111,7 @@ $phone: var(--phone, #606266); //#ff4242;
padding: 14px 32px;
.left {
font-size: 16px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.close {
......@@ -125,7 +125,7 @@ $phone: var(--phone, #606266); //#ff4242;
}
.bzdesc {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #333333;
.bz-source {
width: 743px;
......@@ -195,7 +195,7 @@ $phone: var(--phone, #606266); //#ff4242;
bottom: -24px;
right: 36px;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #FF3745;
}
.input-error {
......@@ -239,7 +239,7 @@ $phone: var(--phone, #606266); //#ff4242;
width: 100%;
.footer-title {
font-size: 14px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
/deep/.el-textarea {
width: 100%;
......
......@@ -352,7 +352,7 @@ const datas = [
margin: 0 0 10px 0;
.rwh {
font-size: 14px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
font-weight: bold;
color: #282F3C;
}
......@@ -480,7 +480,7 @@ const datas = [
.txt {
z-index: 10;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #FFFFFF;
}
}
......
......@@ -828,7 +828,7 @@ label {
margin: 0 0 10px 0;
.rwh {
font-size: 14px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
font-weight: bold;
color: #282F3C;
}
......@@ -943,7 +943,7 @@ label {
.txt {
z-index: 10;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #FFFFFF;
}
}
......@@ -1006,7 +1006,7 @@ label {
.txt {
z-index: 10;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #FFFFFF;
}
}
......@@ -1040,7 +1040,7 @@ label {
top: 0;
left: 6px;
font-size: 12px;
font-family: Microsoft YaHei;
font-family: MicrosoftYaHei;
color: #666666;
&.noFinger {
color: #FF3644;
......
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