Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
9
912project
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
CRS
912project
Commits
d313dc62
提交
d313dc62
authored
3月 06, 2020
作者:
CRS
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new
上级
f9b9caa6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
133 行增加
和
25 行删除
+133
-25
addTechnical.vue
src/components/admittance/technical/addTechnical.vue
+72
-17
technical.vue
src/components/admittance/technical/technical.vue
+27
-4
home.vue
src/components/home/home.vue
+22
-4
CS.png
src/components/home/img/CS.png
+0
-0
GZ.png
src/components/home/img/GZ.png
+0
-0
server.js
src/services/server.js
+12
-0
没有找到文件。
src/components/admittance/technical/addTechnical.vue
浏览文件 @
d313dc62
...
...
@@ -31,18 +31,18 @@
</el-select>
<img
src=
"./img/delN.png"
class=
"del"
>
</p>
<p
style=
"margin-bottom: 10px;"
v-for=
"(
item
,index) of allProduct"
v-if=
"allProduct.length !== 0"
>
<el-select
v-model=
"
item.product1"
placeholder=
"请选择"
clearable
@
change=
"changeVal(item
.product1,index)"
>
<p
style=
"margin-bottom: 10px;"
v-for=
"(
val
,index) of allProduct"
v-if=
"allProduct.length !== 0"
>
<el-select
v-model=
"
val.product1"
placeholder=
"请选择"
clearable
@
change=
"changeVal(val
.product1,index)"
>
<el-option
v-for=
"item in product1List"
v-for=
"item in
val.
product1List"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
v-model=
"
item
.product2"
placeholder=
"请选择"
clearable
style=
"margin-left: 20px;"
>
<el-select
v-model=
"
val
.product2"
placeholder=
"请选择"
clearable
style=
"margin-left: 20px;"
>
<el-option
v-for=
"item in product2List"
v-for=
"item in
val.
product2List"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
...
...
@@ -65,7 +65,7 @@
<
script
>
export
default
{
props
:
[],
props
:
[
'row'
],
data
()
{
return
{
addVal
:
''
,
...
...
@@ -100,17 +100,72 @@ export default {
created
()
{
},
mounted
(){
if
(
this
.
row
!==
''
)
{
// 当页面传值过来时
this
.
addVal
=
this
.
row
.
name
;
// 修改名称
for
(
let
i
=
0
;
i
<
this
.
row
.
producies
.
length
;
i
++
)
{
if
(
i
===
1
)
{
// 修改第一个产品类型
this
.
product1
=
this
.
row
.
producies
[
i
].
form
;
this
.
product2
=
this
.
row
.
producies
[
i
].
id
;
}
else
{
// 修改后面自动生成的产品类型
let
product2List
;
this
.
$server
.
getFindByForm
(
this
.
row
.
producies
[
i
].
form
).
then
((
res
)
=>
{
// 数据请求
if
(
res
.
data
.
code
===
200
)
{
product2List
=
res
.
data
.
data
;
let
val
=
{
'product1'
:
this
.
row
.
producies
[
i
].
form
,
'product2'
:
this
.
row
.
producies
[
i
].
id
,
'product1List'
:
this
.
product1List
,
'product2List'
:
product2List
}
this
.
allProduct
.
push
(
val
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'数据请求失败!'
);
})
}
}
}
},
methods
:
{
// 保存
save
()
{
let
va
=
[];
va
.
push
(
this
.
product2
);
for
(
let
item
of
this
.
allProduct
)
{
va
.
push
(
item
.
product2
)
}
let
val
=
{
'name'
:
this
.
addVal
,
'product1'
:
this
.
product1
,
'product2'
:
this
.
product2
,
'allProduct'
:
this
.
allProduct
'produceList'
:
va
}
console
.
log
(
val
)
if
(
this
.
row
!==
''
)
{
// 修改技术路线
val
.
id
=
this
.
row
.
id
this
.
$server
.
putTechUpdate
(
val
).
then
((
res
)
=>
{
// 数据请求
console
.
log
(
res
.
data
.
data
)
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
'修改技术路线成功!'
)
this
.
$emit
(
'on-cancel'
)
}
else
{
this
.
$message
.
error
(
'修改技术路线失败!'
)
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'数据请求失败!'
);
})
}
else
{
// 新增技术路线
this
.
$server
.
postTechAdd
(
val
).
then
((
res
)
=>
{
// 数据请求
console
.
log
(
res
.
data
.
data
)
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
'新增技术路线成功!'
)
this
.
$emit
(
'on-cancel'
)
}
else
{
this
.
$message
.
error
(
'新增技术路线失败!'
)
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'数据请求失败!'
);
})
}
},
// 取消
cancel
()
{
...
...
@@ -118,20 +173,20 @@ export default {
},
// 新增产品组合
addProduct
()
{
let
val
=
{
let
val
=
{
// 新增产品类型和产品类型列表
'product1'
:
''
,
'product2'
:
''
'product2'
:
''
,
'product1List'
:
this
.
product1List
,
'product2List'
:
''
}
this
.
allProduct
.
push
(
val
);
console
.
log
(
this
.
allProduct
)
},
// 选择产品组合
changeVal
(
val
,
index
)
{
if
(
val
!==
''
)
{
if
(
val
!==
''
)
{
// 选择不同的产品类型,显示不同的列表
this
.
$server
.
getFindByForm
(
val
).
then
((
res
)
=>
{
// 数据请求
if
(
res
.
data
.
code
===
200
)
{
this
.
product2List
=
res
.
data
.
data
;
this
.
allProduct
[
index
].
product2List
=
res
.
data
.
data
;
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'数据请求失败!'
);
...
...
@@ -149,7 +204,7 @@ export default {
},
watch
:
{
'product1'
:
function
(
val
)
{
this
.
product2
=
''
;
this
.
product2
=
''
;
// 第一个产品类型修改监听
if
(
val
!==
''
)
{
this
.
$server
.
getFindByForm
(
val
).
then
((
res
)
=>
{
// 数据请求
if
(
res
.
data
.
code
===
200
)
{
...
...
src/components/admittance/technical/technical.vue
浏览文件 @
d313dc62
...
...
@@ -10,8 +10,15 @@
<el-input
v-model=
"technicalVal"
size=
"medium"
placeholder=
"请输入"
></el-input>
</span>
<span
class=
"searchVal"
>
<span
style=
"width: 130px;"
>
产品名称:
</span>
<el-input
v-model=
"productVal"
size=
"medium"
placeholder=
"请输入"
></el-input>
<span
style=
"width: 90px;"
>
产品名称:
</span>
<el-select
v-model=
"productVal"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"item in productList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</span>
<span
class=
"button"
@
click=
"search"
>
搜索
</span>
<span
class=
"button new"
@
click=
"addperson"
title=
"新增技术路线"
><img
src=
"./img/add.png"
></span>
...
...
@@ -70,7 +77,7 @@
<!-- 新增 / 编辑 公用弹窗 -->
<el-dialog
:visible
.
sync=
"openModel"
class=
"model"
>
<img
src=
"../../../assets/img/close.png"
class=
"closeModel"
@
click=
"reset()"
>
<component
:is=
"components"
@
on-cancel=
"reset"
></component>
<component
:is=
"components"
:row=
"nowRow"
@
on-cancel=
"reset"
></component>
</el-dialog>
</div>
</template>
...
...
@@ -87,12 +94,22 @@ export default {
components
:
''
,
// 当前弹框内容
technicalVal
:
''
,
// 技术路线名称
productVal
:
''
,
// 产品名称
productList
:
[],
// 产品名称列表
allData
:[],
// 列表内容
nowRow
:
''
,
// 当前点击的行数据
}
},
created
()
{
},
mounted
(){
this
.
$server
.
getProduceFindAccess
().
then
((
res
)
=>
{
// 数据请求
if
(
res
.
data
.
code
===
200
)
{
this
.
productList
=
res
.
data
.
data
;
}
console
.
log
(
res
.
data
.
data
)
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'数据请求失败!'
);
})
this
.
init
();
},
methods
:
{
...
...
@@ -104,6 +121,8 @@ export default {
'page'
:
this
.
currentPage
,
'pageSize'
:
this
.
pagesize
,
't'
:
{
'name'
:
this
.
technicalVal
,
'produceId'
:
this
.
productVal
}
}
}
else
{
...
...
@@ -141,6 +160,8 @@ export default {
reset
()
{
this
.
init
();
this
.
openModel
=
false
;
this
.
components
=
''
;
this
.
nowRow
=
''
;
},
// 新增技术路线
addperson
()
{
...
...
@@ -149,7 +170,9 @@ export default {
},
// 查看产品管理
product
(
row
)
{
console
.
log
(
row
);
this
.
openModel
=
true
;
this
.
components
=
'add'
;
this
.
nowRow
=
row
;
}
},
components
:
{
...
...
src/components/home/home.vue
浏览文件 @
d313dc62
...
...
@@ -62,19 +62,28 @@
</div>
<p
class=
"title XC"
>
XX应用系统适配替换
</p>
<div
class=
"XCmenu"
>
<p>
<p
v-if=
"this.$store.getters.getUserData.type === 1"
@
click=
"goOther('http://120.55.57.35:8080/assessment/#/Assessment')"
>
<img
src=
"./img/PG.png"
>
<span>
评估报告管理
</span>
<span
class=
"line"
></span>
</p>
<p>
<p
v-if=
"this.$store.getters.getUserData.type !== 1"
@
click=
"goOther('http://120.55.57.35:8080/assessment/#/home')"
>
<img
src=
"./img/XT.png"
>
<span>
系统改造评估
</span>
<span
class=
"line"
></span>
</p>
<p>
<p
v-if=
"this.$store.getters.getUserData.type === 1"
@
click=
"goOther('http://120.55.57.35:8080/assessment/#/technology')"
>
<img
src=
"./img/JS.png"
>
<span>
关键技术管理
</span>
<span
class=
"line"
></span>
</p>
<p
v-if=
"this.$store.getters.getUserData.type === 1"
@
click=
"goOther('http://120.55.57.35:8080/assessment/#/configuration')"
>
<img
src=
"./img/CS.png"
>
<span>
规则配置
</span>
<span
class=
"line"
></span>
</p>
<p
v-if=
"this.$store.getters.getUserData.type === 1"
@
click=
"goOther('http://120.55.57.35:8080/assessment/#/parameter')"
>
<img
src=
"./img/GZ.png"
>
<span>
参数配置
</span>
</p>
</div>
</el-col>
...
...
@@ -104,6 +113,15 @@ export default {
}
this
.
$store
.
commit
(
'changeHomeClick'
,
val
);
// 传给导航进行样式定位和点击事件
this
.
$store
.
commit
(
'changeNowPath'
,
path
);
// 当前path传给header作比对
},
// 跳转到其他页面
goOther
(
path
)
{
if
(
path
===
'http://120.55.57.35:8080/assessment/#/home'
)
{
let
val
=
'http://120.55.57.35:8080/assessment/#/home'
+
'?userName='
+
this
.
$store
.
getters
.
getUserData
.
userName
;
window
.
open
(
val
);
}
else
{
window
.
open
(
path
);
}
}
},
components
:
{
...
...
src/components/home/img/CS.png
0 → 100644
浏览文件 @
d313dc62
920 Bytes
src/components/home/img/GZ.png
0 → 100644
浏览文件 @
d313dc62
1.1 KB
src/services/server.js
浏览文件 @
d313dc62
...
...
@@ -177,5 +177,17 @@ const server = {
data
:
data
});
},
postTechAdd
(
data
)
{
// 新增技术路线
return
axios
(
'/tech/add'
,
{
method
:
'post'
,
data
:
data
});
},
putTechUpdate
(
data
)
{
// 修改技术路线
return
axios
(
'/tech/update'
,
{
method
:
'put'
,
data
:
data
});
},
}
export
default
server
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论