Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
9
912project
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
CRS
912project
Commits
517f8403
提交
517f8403
authored
3月 09, 2020
作者:
zax
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
input事件修改
上级
9c6d9001
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
62 行增加
和
47 行删除
+62
-47
newProduct.vue
src/components/admittance/product/newProduct.vue
+23
-10
product.vue
src/components/admittance/product/product.vue
+3
-13
newProduct.vue
src/components/basicInformation/product/newProduct.vue
+24
-10
product.vue
src/components/basicInformation/product/product.vue
+4
-13
add-select.png
src/components/projectManagement/project/img/add-select.png
+0
-0
add.png
src/components/projectManagement/project/img/add.png
+0
-0
projectAdd.vue
src/components/projectManagement/project/projectAdd.vue
+0
-0
server.js
src/services/server.js
+6
-0
element.js
src/tools/element.js
+2
-1
没有找到文件。
src/components/admittance/product/newProduct.vue
浏览文件 @
517f8403
...
...
@@ -103,19 +103,32 @@ export default {
name
:
this
.
name
,
producer
:
this
.
producer
,
status
:
parseInt
(
this
.
status
),
techId
:
0
,
techId
:
''
,
type
:
parseInt
(
this
.
type
)
};
this
.
$server
.
postProduceAdd
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
this
.
text
+
'成功!'
);
this
.
$emit
(
'on-cancel'
,
true
)
}
else
{
if
(
this
.
text
===
'产品信息修改'
)
{
this
.
$server
.
putProduceUpdate
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
this
.
text
+
'成功!'
);
this
.
$emit
(
'on-cancel'
,
true
)
}
else
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
})
})
}
else
{
this
.
$server
.
postProduceAdd
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
this
.
text
+
'成功!'
);
this
.
$emit
(
'on-cancel'
,
true
)
}
else
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
})
}
}
},
components
:
{
...
...
src/components/admittance/product/product.vue
浏览文件 @
517f8403
...
...
@@ -53,10 +53,12 @@
align=
"center"
>
</el-table-column>
>
<el-table-column
:formatter=
"techIdChange"
prop=
"techId"
label=
"技术路线"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.tech !== null"
>
{{
scope
.
row
.
tech
.
name
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
...
...
@@ -133,18 +135,6 @@ export default {
this
.
$message
.
error
(
'数据请求失败!'
);
})
},
// 技术路线值转换
techIdChange
(
row
)
{
if
(
row
.
techId
===
null
)
{
return
''
}
else
{
this
.
techList
.
map
(
item
=>
{
if
(
item
.
id
===
row
.
techId
)
{
return
item
.
name
}
})
}
},
// 产品分类转换
formChange
(
row
)
{
return
this
.
formVal
[
row
.
form
]
...
...
src/components/basicInformation/product/newProduct.vue
浏览文件 @
517f8403
...
...
@@ -99,19 +99,33 @@ export default {
name
:
this
.
name
,
producer
:
this
.
producer
,
status
:
parseInt
(
this
.
status
),
techId
:
0
,
techId
:
''
,
type
:
parseInt
(
this
.
type
)
};
this
.
$server
.
postProduceAdd
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
this
.
text
+
'成功!'
);
this
.
$emit
(
'on-cancel'
,
true
)
}
else
{
console
.
log
(
data
)
if
(
this
.
text
===
'产品信息修改'
)
{
this
.
$server
.
putProduceUpdate
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
this
.
text
+
'成功!'
);
this
.
$emit
(
'on-cancel'
,
true
)
}
else
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
})
})
}
else
{
this
.
$server
.
postProduceAdd
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
$message
.
success
(
this
.
text
+
'成功!'
);
this
.
$emit
(
'on-cancel'
,
true
)
}
else
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
this
.
text
+
'失败!'
);
})
}
}
},
components
:
{
...
...
src/components/basicInformation/product/product.vue
浏览文件 @
517f8403
...
...
@@ -69,9 +69,12 @@
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"tech
.name
"
prop=
"tech"
label=
"技术路线"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.tech !== null"
>
{{
scope
.
row
.
tech
.
name
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
...
...
@@ -152,18 +155,6 @@ export default {
this
.
$message
.
error
(
'数据请求失败!'
);
})
},
// 技术路线值转换
techIdChange
(
row
)
{
if
(
row
.
techId
===
null
)
{
return
''
}
else
{
this
.
techList
.
map
(
item
=>
{
if
(
item
.
id
===
row
.
techId
)
{
return
item
.
name
}
})
}
},
// 产品分类转换
formChange
(
row
)
{
return
this
.
formVal
[
row
.
form
]
...
...
src/components/projectManagement/project/img/add-select.png
0 → 100644
浏览文件 @
517f8403
425 Bytes
src/components/projectManagement/project/img/add.png
0 → 100644
浏览文件 @
517f8403
425 Bytes
src/components/projectManagement/project/projectAdd.vue
浏览文件 @
517f8403
差异被折叠。
点击展开。
src/services/server.js
浏览文件 @
517f8403
...
...
@@ -189,5 +189,11 @@ const server = {
data
:
data
});
},
putProduceUpdate
(
data
)
{
// 修改产品信息
return
axios
(
'/produce/update'
,
{
method
:
'put'
,
data
:
data
});
},
}
export
default
server
;
src/tools/element.js
浏览文件 @
517f8403
import
Vue
from
'vue'
import
{
Row
,
Col
,
Carousel
,
CarouselItem
,
Scrollbar
,
Input
,
Button
,
Table
,
TableColumn
,
Pagination
,
Dialog
,
Message
,
Select
,
Option
,
Form
,
FormItem
,
Radio
,
RadioGroup
,
Upload
,
DatePicker
}
from
'element-ui'
Message
,
Select
,
Option
,
Form
,
FormItem
,
Radio
,
RadioGroup
,
Upload
,
DatePicker
,
Checkbox
}
from
'element-ui'
import
'./element-variables.scss'
Vue
.
use
(
Row
);
Vue
.
use
(
Col
);
...
...
@@ -26,3 +26,4 @@ Vue.use(Radio);
Vue
.
use
(
RadioGroup
);
Vue
.
use
(
Upload
);
Vue
.
use
(
DatePicker
);
Vue
.
use
(
Checkbox
);
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论