openatc-components 0.4.37 → 0.4.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webpack.base.conf.js +6 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +66 -35
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1 -3
- package/package/kissui.min.js +1 -1
- package/package/static/img/CrossRoadsSvg.66a6236.svg +529 -0
- package/package.json +5 -4
- package/src/assets/svg/CrossRoadsSvg.svg +529 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +66 -35
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1 -3
- package/src/views/customchannelization.vue +6 -6
- package/src/views/intersection.vue +1 -1
- package/static/img/CrossRoadsSvg.svg +529 -0
- package/package/kisscomps/components/OptimizeKanban/index.js +0 -2
- package/package/kisscomps/components/OptimizeKanban/index.vue +0 -369
- package/src/node_modules/.package_versions.json +0 -1
|
@@ -61,6 +61,11 @@ module.exports = {
|
|
|
61
61
|
symbolId: 'icon-[name]'
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
test: /\.svg$/,
|
|
66
|
+
loader: 'raw-loader', // 让 Webpack 直接返回 SVG 文件内容
|
|
67
|
+
include: [resolve('src/assets/svg')] // 仅针对 `src/assets/svg` 目录
|
|
68
|
+
},
|
|
64
69
|
{
|
|
65
70
|
test: /\.less$/,
|
|
66
71
|
loader: ['style', 'css', 'less'],
|
|
@@ -68,7 +73,7 @@ module.exports = {
|
|
|
68
73
|
{
|
|
69
74
|
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
|
70
75
|
loader: 'url-loader',
|
|
71
|
-
exclude: [resolve('src/icons')],
|
|
76
|
+
exclude: [resolve('src/icons'), resolve('src/assets/svg')],
|
|
72
77
|
options: {
|
|
73
78
|
limit: 10000,
|
|
74
79
|
name: utils.assetsPath('img/[name].[hash:7].[ext]')
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
|
-
* See the Mulan PSL v2 for more details.
|
|
11
|
-
**/
|
|
12
|
-
<!--完整渠化编辑功能,包含导入-->
|
|
1
|
+
/** * Copyright (c) 2020 kedacom * OpenATC is licensed under Mulan PSL v2. * You
|
|
2
|
+
can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
3
|
+
* You may obtain a copy of Mulan PSL v2 at: *
|
|
4
|
+
http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS"
|
|
5
|
+
BASIS, WITHOUT WARRANTIES OF ANY KIND, * EITHER EXPRESS OR IMPLIED, INCLUDING
|
|
6
|
+
BUT NOT LIMITED TO NON-INFRINGEMENT, * MERCHANTABILITY OR FIT FOR A PARTICULAR
|
|
7
|
+
PURPOSE. * See the Mulan PSL v2 for more details. **/
|
|
8
|
+
<!--完整渠化编辑功能,包含导入-->
|
|
13
9
|
<template>
|
|
14
10
|
<div class="custom-cross-part draw-channelization">
|
|
15
|
-
<FirstImportCrossmap v-if="pageindex === 1"
|
|
11
|
+
<!-- <FirstImportCrossmap v-if="pageindex === 1"
|
|
16
12
|
@loadSvgString="loadSvgString" @loadMapSize="loadMapSize" />
|
|
17
13
|
<CustomDraw v-show="pageindex === 2" ref="CustomDraw"
|
|
18
14
|
:AgentId="AgentId"
|
|
19
15
|
:loadedChannelizatonData="loadedChannelizatonData"
|
|
20
|
-
@saveCallback="saveCallback" />
|
|
16
|
+
@saveCallback="saveCallback" /> -->
|
|
17
|
+
<CustomDraw
|
|
18
|
+
ref="CustomDraw"
|
|
19
|
+
:AgentId="AgentId"
|
|
20
|
+
:loadedChannelizatonData="loadedChannelizatonData"
|
|
21
|
+
@saveCallback="saveCallback"
|
|
22
|
+
/>
|
|
21
23
|
</div>
|
|
22
24
|
</template>
|
|
23
25
|
<script>
|
|
24
26
|
import FirstImportCrossmap from './firstImportCrossmap'
|
|
25
27
|
import CustomDraw from './index.draw'
|
|
26
28
|
import { getChannelizatonChart } from '../../../../api/cross'
|
|
29
|
+
import DefaultCrossRoadsSvg from '../../../../assets/svg/CrossRoadsSvg.svg'
|
|
27
30
|
|
|
28
31
|
export default {
|
|
29
32
|
name: 'custom-channelization',
|
|
@@ -77,28 +80,57 @@ export default {
|
|
|
77
80
|
getChannelizatonChart () {
|
|
78
81
|
let _this = this
|
|
79
82
|
_this.pageindex = 1
|
|
80
|
-
getChannelizatonChart(this.AgentId)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
getChannelizatonChart(this.AgentId)
|
|
84
|
+
.then((data) => {
|
|
85
|
+
if (!data.data.success) {
|
|
86
|
+
// let parrenterror = getMessageByCode(data.data.code, _this.$i18n.locale)
|
|
87
|
+
// if (data.data.data) {
|
|
88
|
+
// // 子类型错误
|
|
89
|
+
// let childErrorCode = data.data.data.errorCode
|
|
90
|
+
// if (childErrorCode) {
|
|
91
|
+
// let childerror = getMessageByCode(data.data.data.errorCode, _this.$i18n.locale)
|
|
92
|
+
// _this.$message.error(parrenterror + ',' + childerror)
|
|
93
|
+
// }
|
|
94
|
+
// } else {
|
|
95
|
+
// _this.$message.error(parrenterror)
|
|
96
|
+
// }
|
|
97
|
+
this.AutoReadSVG()
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
if (
|
|
101
|
+
data.data.data === undefined ||
|
|
102
|
+
JSON.stringify(data.data.data) === '{}'
|
|
103
|
+
) {
|
|
104
|
+
this.AutoReadSVG()
|
|
105
|
+
return
|
|
106
|
+
}
|
|
107
|
+
_this.pageindex = 2
|
|
108
|
+
_this.loadedChannelizatonData = JSON.parse(
|
|
109
|
+
JSON.stringify(data.data.data)
|
|
110
|
+
)
|
|
111
|
+
})
|
|
112
|
+
.catch(() => {
|
|
113
|
+
this.AutoReadSVG()
|
|
114
|
+
})
|
|
99
115
|
},
|
|
100
116
|
saveCallback (res) {
|
|
101
117
|
this.$emit('saveCallback', res)
|
|
118
|
+
},
|
|
119
|
+
AutoReadSVG () {
|
|
120
|
+
this.loadedChannelizatonData = {
|
|
121
|
+
crossMap: {
|
|
122
|
+
index: -2,
|
|
123
|
+
icontype: 'crossmap',
|
|
124
|
+
x: 435,
|
|
125
|
+
y: 325,
|
|
126
|
+
w: 870,
|
|
127
|
+
h: 650,
|
|
128
|
+
angle: 0,
|
|
129
|
+
imgfilesrc: '',
|
|
130
|
+
svgstr: DefaultCrossRoadsSvg,
|
|
131
|
+
type: 'vectorgraph'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
102
134
|
}
|
|
103
135
|
},
|
|
104
136
|
mounted () {
|
|
@@ -106,5 +138,4 @@ export default {
|
|
|
106
138
|
}
|
|
107
139
|
}
|
|
108
140
|
</script>
|
|
109
|
-
<style scoped>
|
|
110
|
-
</style>
|
|
141
|
+
<style scoped></style>
|
|
@@ -1567,9 +1567,7 @@ export default {
|
|
|
1567
1567
|
let maxNum = Math.max.apply(Math, na.map(item => { return item.length }))
|
|
1568
1568
|
let minNum = Math.min.apply(Math, na.map(item => { return item.length }))
|
|
1569
1569
|
newMax.push(maxNum)
|
|
1570
|
-
|
|
1571
|
-
newMin.push(minNum)
|
|
1572
|
-
}
|
|
1570
|
+
newMin.push(minNum)
|
|
1573
1571
|
let newmaxNum = Math.max.apply(Math, newMax)// 每组最大值
|
|
1574
1572
|
let newminNum = Math.min.apply(Math, newMin)
|
|
1575
1573
|
if (newArr.length > 1) {
|