Commit 485787d1 by 米嘉伟

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

parents e237280c 58dbee52
......@@ -507,7 +507,6 @@
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';
var returnThis = function () { return this; };
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
......@@ -3893,7 +3892,6 @@
imagetracer.imageToSVG(imgUrl, function (svgstr) {
var _svgstr$match = svgstr.match(/path[^>]*d="([^"]*)"/),
svgPath = _svgstr$match[1];
var iconObj = {};
iconObj[file.name] = svgPath;
_this2.registerIcons(iconObj);
......@@ -3914,7 +3912,6 @@
*/
_drawAction: function _drawAction() {
var _this3 = this;
return (0, _tuiCodeSnippet.extend)({
setDrawMode: function setDrawMode(type, settings) {
_this3.stopDrawingMode();
......@@ -4262,6 +4259,7 @@
},
/* eslint-disable complexity */
objectActivated: function objectActivated(obj) {
_this12.activeObjectId = obj.id;
_this12.ui.changeHelpButtonEnabled('delete', true);
......@@ -4279,7 +4277,6 @@
strokeWidth: obj.strokeWidth,
fillColor: obj.fill
});
_this12.ui.shape.setMaxStrokeValue(Math.min(obj.width, obj.height));
} else if (obj.type === 'path' || obj.type === 'line') {
if (_this12.ui.submenu !== 'draw') {
......@@ -16014,6 +16011,7 @@
pcnt = (pcnt + 1) % path.points.length;
}
if (curvepass) {
return [{
type: 'L',
x1: path.points[seqstart].x,
......@@ -18812,6 +18810,7 @@
}, {
key: 'changeShape',
value: function changeShape(id, options, isSilent) {
var executeMethodName = isSilent ? 'executeSilent' : 'execute';
return this[executeMethodName](_consts.commandNames.CHANGE_SHAPE, id, options);
......@@ -18853,6 +18852,7 @@
}, {
key: 'addText',
value: function addText(text, options) {
text = text || '';
options = options || {};
......@@ -18898,6 +18898,7 @@
}, {
key: 'changeTextStyle',
value: function changeTextStyle(id, styleObj, isSilent) {
var executeMethodName = isSilent ? 'executeSilent' : 'execute';
return this[executeMethodName](_consts.commandNames.CHANGE_TEXT_STYLE, id, styleObj);
......@@ -18940,6 +18941,7 @@
}, {
key: '_onIconCreateResize',
value: function _onIconCreateResize(originPointer) {
this.fire(_consts.eventNames.ICON_CREATE_RESIZE, originPointer);
}
......@@ -19016,11 +19018,15 @@
*/
}, {
//获取不到对象在这里看
key: '_onAddObject',
value: function _onAddObject(objectProps) {
var obj = this._graphics.getObject(objectProps.id);
this._invoker.fire(_consts.eventNames.EXECUTE_COMMAND, (0, _util.getObjectType)(obj.type));
this._pushAddObjectCommand(obj);
if(objectProps.type == 'path'){
this._onObjectAdded(objectProps);
}
}
/**
......@@ -19032,6 +19038,7 @@
}, {
key: '_onObjectAdded',
value: function _onObjectAdded(objectProps) {
/**
* The event when object added
* @event ImageEditor#objectAdded
......@@ -20276,7 +20283,7 @@
var _this4 = this;
if (this._isLocked) {
return _util.Promise.reject(_consts.rejectMessages.isLock);
// return _util.Promise.reject(_consts.rejectMessages.isLock);
}
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
......@@ -1245,6 +1245,7 @@ div {
height: 750px;
display: flex;
.source {
z-index: 0;
position: relative;
box-sizing: border-box;
width: 560px;
......@@ -1332,6 +1333,7 @@ div {
height: 750px;
background: #ffffff;
border-radius: 8px;
z-index: 0;
border: 2px solid $targetB;
display: flex;
flex-direction: column;
......
<!--
* @Author: your name
* @Date: 2021-09-09 09:28:46
* @LastEditTime: 2021-11-03 15:12:59
* @LastEditTime: 2021-11-05 11:14:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\cxyrd\LTz.vue
......@@ -648,7 +648,14 @@ export default {
isShowEnlargeSynchro: false,
curveArr: [],
// 对比度
inputContrastRange: 0
inputContrastRange: 0,
//源数据角度
startPlaceSource: 0,
//目标数据角度
startPlaceTarget: 0,
//target的曲线对象集合
path2: [],
path: []
};
},
components: {
......@@ -919,9 +926,11 @@ export default {
// Attach image editor custom events
imageEditor.on({
objectAdded: function (objectProps) {
console.info(objectProps);
console.log(objectProps,22222222);
if (objectProps.type == 'line') {
self.lines.push(objectProps)
}else if(objectProps.type == 'path'){
self.path.push(objectProps)
}
// self.historys.push(objectProps.type)
console.log(111);
......@@ -994,9 +1003,11 @@ export default {
imageEditor2.on({
objectAdded: function (objectProps) {
console.info(objectProps);
console.log('imageEditor2======',objectProps)
if (objectProps.type == 'line') {
self.lines2.push(objectProps)
}else if(objectProps.type == 'path'){
self.path2.push(objectProps)
}
},
undoStackChanged: function (length) {
......@@ -1477,6 +1488,7 @@ export default {
self.isReset = true
// 旋转角度同样恢复到0
self.inputRotationRange = 0
self.startPlaceSource = 0
// 事件不能连续重复执行,需要缓存时间
setTimeout(() => {
imageEditor.setAngle(0)['catch'](function () { });
......@@ -1493,6 +1505,7 @@ export default {
self.isReset = true
// 旋转角度同样恢复到0
self.inputRotationRange = 0
self.startPlaceTarget = 0;
setTimeout(() => {
imageEditor2.setAngle(0)['catch'](function () { });
}, 200);
......@@ -1508,11 +1521,13 @@ export default {
// 向左旋转30°
$btnRotateClockwise.on('click', function () {
if (self.type == 'source') {
self.startPlaceSource += 30;
self.isLeftRotate = true
self.isRightRotate = false
imageEditor.rotate(30);
self.historys.push('旋转')
} else {
self.startPlaceTarget += 30;
self.isLeftRotate = true
self.isRightRotate = false
imageEditor2.rotate(30);
......@@ -1522,11 +1537,13 @@ export default {
// 向右旋转30°
$btnRotateCounterClockWise.on('click', function () {
if (self.type == 'source') {
self.startPlaceSource -= 30;
self.isLeftRotate = false
self.isRightRotate = true
imageEditor.rotate(-30);
self.historys.push('旋转')
} else {
self.startPlaceTarget -= 30;
self.isLeftRotate = false
self.isRightRotate = true
imageEditor2.rotate(-30);
......@@ -1536,12 +1553,17 @@ export default {
// 滑动旋转事件
$inputRotationRange.on('mousedown', function () {
var changeAngle = function () {
console.log('mousedown')
if (self.type == 'source') {
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
imageEditor.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
imageEditor.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlaceSource)
self.startPlaceSource = self.inputRotationRange;
} else {
self.inputRotationRange2 = parseInt($inputRotationRange.val(), 10)
imageEditor2.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
imageEditor2.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlaceTarget)
self.startPlaceTarget = self.inputRotationRange2;
}
};
$(document).on('mousemove', changeAngle);
......@@ -1552,13 +1574,17 @@ export default {
});
// 滑动旋转事件
$inputRotationRange.on('change', function () {
console.log('change')
if (self.type == 'source') {
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
imageEditor.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
imageEditor.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlaceSource)
self.startPlaceSource = self.inputRotationRange;
self.historys.push('旋转')
} else {
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
imageEditor2.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
self.inputRotationRange2 = parseInt($inputRotationRange.val(), 10)
imageEditor2.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlaceTarget)
self.startPlaceTarget = self.inputRotationRange2;
self.historys2.push('旋转')
}
});
......@@ -3106,18 +3132,32 @@ export default {
self.imageEditor.removeObject(element.id)
}, 200);
});
self.path.forEach(element => {
setTimeout(() => {
self.imageEditor.removeObject(element.id)
}, 200);
});
console.log(self.lines);
// 重置辅助线数组
self.lines = []
self.path = []
} else {
//target对象直线
self.lines2.forEach(element => {
setTimeout(() => {
self.imageEditor2.removeObject(element.id)
}, 200);
});
console.log(self.lines2);
//target对象区线
self.path2.forEach(element => {
setTimeout(() => {
self.imageEditor2.removeObject(element.id)
}, 200);
});
// 重置辅助线数组
self.lines2 = []
self.lines2 = [];
self.path2 = [];
}
},
/**
......@@ -4756,10 +4796,19 @@ export default {
}
},
inputRotationRange (newValue, oldValue) {
let deg;
if (this.type == 'source') {
this.imageEditor.setAngle(newValue)['catch'](function () { });
deg = newValue - this.startPlaceSource;
if(!deg) deg = 0;
this.imageEditor.rotate(deg);
this.startPlaceSource = newValue;
// this.imageEditor.setAngle(newValue)['catch'](function () { });
} else {
this.imageEditor2.setAngle(newValue)['catch'](function () { });
deg = newValue - this.startPlaceTarget;
if(!deg) deg = 0;
this.imageEditor2.rotate(deg);
this.startPlaceTarget = newValue;
// this.imageEditor2.setAngle(newValue)['catch'](function () { });
}
},
inputRemoveWhiteRange (newValue, oldValue) {
......@@ -4855,6 +4904,16 @@ export default {
});
}, 500);
})
this.path.forEach((item) => {
setTimeout(() => {
self.imageEditor.setObjectPosition(item.id, {
x: -1000,
y: -1000,
originX: 'left',
originY: 'top'
});
}, 500);
})
} else {
console.log(this.lines);
this.lines.forEach((item) => {
......@@ -4883,6 +4942,16 @@ export default {
}
}, 200);
})
this.path.forEach((item) => {
setTimeout(() => {
self.imageEditor.setObjectPosition(item.id, {
x: item.left,
y: item.top,
originX: 'center',
originY: 'center'
});
}, 200);
})
}
} else {
if (newValue) {
......@@ -4897,9 +4966,19 @@ export default {
});
}, 500);
})
this.path2.forEach((item) => {
setTimeout(() => {
self.imageEditor2.setObjectPosition(item.id, {
x: -1000,
y: -1000,
originX: 'left',
originY: 'top'
});
}, 500);
})
} else {
console.log(this.lines2);
this.lines2.forEach((item) => {
//target对象直线的展示
setTimeout(() => {
if ((item.endPosition.x - item.startPosition.x >= 0) && item.endPosition.y - item.startPosition.y >= 0) {
self.imageEditor2.setObjectPosition(item.id, {
......@@ -4925,6 +5004,17 @@ export default {
}
}, 200);
})
//target对象曲线的展示
this.path2.forEach((item) => {
setTimeout(() => {
self.imageEditor2.setObjectPosition(item.id, {
x: item.left,
y: item.top,
originX: 'center',
originY: 'center'
});
}, 200);
})
}
}
},
......
/*
* @Author: your name
* @Date: 2021-09-07 09:58:13
* @LastEditTime: 2021-11-04 11:08:44
* @LastEditTime: 2021-11-04 09:26:19
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\router\modules\index.js
......
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-04 21:35:52
* @LastEditTime: 2021-11-05 11:51:32
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
......@@ -988,6 +988,7 @@ export default {
// 旋转角度同样恢复到0
self.inputRotationRange = 0
// 事件不能连续重复执行,需要缓存时间
self.startPlace = 0;
setTimeout(() => {
imageEditor.setAngle(0)['catch'](function () { });
}, 200);
......@@ -1002,36 +1003,31 @@ export default {
// 向左旋转30°
$btnRotateClockwise.on('click', function () {
self.startPlace += 30;
self.isLeftRotate = true
self.isRightRotate = false
imageEditor.rotate(30);
self.historys.push('旋转')
let canvasImage = imageEditor._graphics.getCanvasImage()
// console.log(canvasImage);
$('.tzdDrawing').css('transform', `rotate(${canvasImage.angle}deg)`)
$('.tzdDrawing').css('transform', `rotate(${canvasImage.angle}deg)`);
});
// 向右旋转30°
$btnRotateCounterClockWise.on('click', function () {
self.startPlace -= 30;
self.isLeftRotate = false
self.isRightRotate = true
imageEditor.rotate(-30);
let canvasImage = imageEditor._graphics.getCanvasImage()
// console.log(canvasImage);
$('.tzdDrawing').css('transform', `rotate(${canvasImage.angle}deg)`)
self.historys.push('旋转')
});
// 滑动旋转事件
$inputRotationRange.on('mousedown', function () {
self.startPlace = parseInt($inputRotationRange.val(), 10);
// console.log(self.startPlace)
var changeAngle = function () {
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
// imageEditor.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
imageEditor.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlace)
self.startPlace = self.inputRotationRange;
// console.log(parseInt($inputRotationRange.val(), 10));
// let deg = (parseInt($inputRotationRange.val(), 10) * 180) / Math.PI - 90
// imageEditor.rotate(deg)
};
$(document).on('mousemove', changeAngle);
$(document).on('mouseup', function stopChangingAngle () {
......@@ -1042,13 +1038,8 @@ export default {
// 滑动旋转事件
$inputRotationRange.on('change', function () {
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
// imageEditor.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
imageEditor.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlace)
self.startPlace = self.inputRotationRange;
// console.log(parseInt($inputRotationRange.val(), 10));
// console.log(parseInt($inputRotationRange.val(), 10)); deg = (a * 180) / Math.PI - 90; //弧度转角度
// let deg = (parseInt($inputRotationRange.val(), 10) * 180) / Math.PI - 90
// imageEditor.rotate(deg)
self.historys.push('旋转')
});
......@@ -3120,10 +3111,8 @@ export default {
},
watch: {
inputRotationRange (newValue, oldValue) {
console.log(newValue)
let deg = newValue - this.startPlace;
if(!deg) deg = 0;
// this.imageEditor.setAngle(0)['catch'](function () { });
this.imageEditor.rotate(deg)
let canvasImage = this.imageEditor._graphics.getCanvasImage()
this.startPlace = newValue;
......
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-03 22:29:01
* @LastEditTime: 2021-11-05 11:32:22
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
......@@ -648,7 +648,9 @@ export default {
newWidth: 640,
// tzdDrawing 的移动距离
tzdDrawingLeft: 0,
tzdDrawingTop: 0
tzdDrawingTop: 0,
//旋转之前的度数
startPlace: 0,
};
},
created () {
......@@ -868,7 +870,6 @@ export default {
});
},
objectActivated: function (obj) {
console.log(obj);
if (obj.type === 'circle') {
// 存储标记点数据
self.circleArr.push(obj)
......@@ -877,8 +878,6 @@ export default {
}
},
mousedown: function (event, originPointer) {
console.log(event);
console.log(originPointer);
if ($imageFilterSubMenu.is(':visible') && imageEditor.hasFilter('colorFilter')) {
imageEditor.applyFilter('colorFilter', {
x: parseInt(originPointer.x, 10),
......@@ -970,6 +969,7 @@ export default {
// 旋转角度同样恢复到0
self.inputRotationRange = 0
// 事件不能连续重复执行,需要缓存时间
self.startPlace = 0;
setTimeout(() => {
imageEditor.setAngle(0)['catch'](function () { });
}, 200);
......@@ -982,6 +982,7 @@ export default {
// 向左旋转30°
$btnRotateClockwise.on('click', function () {
self.startPlace += 30;
self.isLeftRotate = true
self.isRightRotate = false
imageEditor.rotate(30);
......@@ -989,6 +990,7 @@ export default {
});
// 向右旋转30°
$btnRotateCounterClockWise.on('click', function () {
self.startPlace -= 30;
self.isLeftRotate = false
self.isRightRotate = true
imageEditor.rotate(-30);
......@@ -998,8 +1000,8 @@ export default {
$inputRotationRange.on('mousedown', function () {
var changeAngle = function () {
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
imageEditor.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
// imageEditor.rotate(parseInt($inputRotationRange.val(), 10))
imageEditor.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlace)
self.startPlace = self.inputRotationRange;
};
$(document).on('mousemove', changeAngle);
$(document).on('mouseup', function stopChangingAngle () {
......@@ -1010,8 +1012,8 @@ export default {
// 滑动旋转事件
$inputRotationRange.on('change', function () {
self.inputRotationRange = parseInt($inputRotationRange.val(), 10)
imageEditor.setAngle(parseInt($inputRotationRange.val(), 10))['catch'](function () { });
// imageEditor.rotate(parseInt($inputRotationRange.val(), 10))
imageEditor.rotate(parseInt($inputRotationRange.val(), 10) - self.startPlace)
self.startPlace = self.inputRotationRange;
self.historys.push('旋转')
});
......@@ -2863,7 +2865,10 @@ export default {
});
},
inputRotationRange (newValue, oldValue) {
this.imageEditor.setAngle(newValue)['catch'](function () { });
let deg = newValue - this.startPlace;
if(!deg) deg = 0;
this.imageEditor.rotate(deg)
this.startPlace = newValue;
},
inputRemoveWhiteRange (newValue, oldValue) {
this.imageEditor.applyFilter('removeColor', {
......
......@@ -270,7 +270,7 @@
<el-input
placeholder="请输入组描述"
class="input-info"
v-model="editFormParams.userId"
v-model="editFormParams.groupdesc"
></el-input>
</el-form-item>
......@@ -278,14 +278,14 @@
<el-input
placeholder="请选择组用户"
class="input-info"
v-model="editFormParams.roleId"
v-model="editFormParams.userId"
></el-input>
</el-form-item>
<el-form-item class="info-item" label="加入组角色:" prop="roleId">
<el-input
placeholder="请选择组角色"
class="input-info"
v-model="editFormParams.okpassword"
v-model="editFormParams.roleId"
></el-input>
</el-form-item>
......
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