Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_adminHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_adminHome
Commits
cfc8b2e0
提交
cfc8b2e0
authored
12月 29, 2023
作者:
zfl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
质检修改
上级
f2770764
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
2527 行增加
和
85 行删除
+2527
-85
index.html
public/index.html
+2
-2
business.js
src/api/business.js
+86
-0
company.js
src/api/company.js
+36
-0
student.js
src/api/student.js
+1
-1
system.js
src/api/system.js
+2
-1
permission.js
src/permission.js
+1
-1
settings.js
src/settings.js
+2
-1
permission.js
src/store/modules/permission.js
+2
-2
count.vue
src/views/business/display_board/count.vue
+878
-0
index.vue
src/views/business/display_board/index.vue
+211
-58
details.vue
src/views/business/raw_data/details.vue
+702
-0
index.vue
src/views/business/raw_data/index.vue
+177
-7
dialog.vue
src/views/business/road/components/dialog.vue
+169
-0
index.vue
src/views/business/road/index.vue
+255
-10
index.vue
src/views/retrieve/index.vue
+3
-2
没有找到文件。
public/index.html
浏览文件 @
cfc8b2e0
...
...
@@ -13,8 +13,8 @@
<meta
name=
"renderer"
content=
"webkit"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<
!-- <title><%= webpackConfig.name %></title> --
>
<
title>
烟草质检管理系统
</title
>
<
title><
%=
webpackConfig
.
name
%
></title
>
<
!-- <title>烟草质检管理系统</title> --
>
</head>
<body>
...
...
src/api/business.js
0 → 100644
浏览文件 @
cfc8b2e0
import
request
from
'@/utils/request'
export
function
industry_commerce_handover_upload
(
data
)
{
return
request
({
url
:
'/api/industry_commerce_handover/upload'
,
method
:
'post'
,
data
})
}
export
function
industry_commerce_handover_list
(
params
)
{
return
request
({
url
:
'/api/industry_commerce_handover'
,
method
:
'get'
,
params
})
}
export
function
industry_commerce_handover_export
(
data
)
{
return
request
({
url
:
'/api/industry_commerce_handover/searchExport'
,
method
:
'post'
,
data
})
}
export
function
industry_commerce_handover_destroy
(
data
)
{
return
request
({
url
:
'/api/industry_commerce_handover/searchDestroy'
,
method
:
'post'
,
data
})
}
//获取烟草等级列表
export
function
getTobaccoList
()
{
return
request
({
url
:
'/student/tobacco_grades/all'
,
method
:
'get'
,
})
}
export
function
ich_raw_data_imageUpload
(
data
)
{
return
request
({
url
:
'/api/ich_raw_data/imageUpload'
,
method
:
'post'
,
data
})
}
export
function
ich_raw_data_save
(
data
)
{
return
request
({
url
:
'/api/ich_raw_data'
,
method
:
'post'
,
data
})
}
export
function
ich_raw_data_list
(
params
)
{
return
request
({
url
:
'/api/ich_raw_data'
,
method
:
'get'
,
params
})
}
export
function
ich_raw_data_get
(
params
)
{
return
request
({
url
:
'/api/ich_raw_data/1'
,
method
:
'get'
,
params
})
}
export
function
ich_raw_data_delete
(
data
)
{
return
request
({
url
:
'/api/ich_raw_data/1'
,
method
:
'delete'
,
data
})
}
export
function
industry_commerce_handover_count
(
data
)
{
return
request
({
url
:
'/api/count_ich/count'
,
method
:
'post'
,
data
})
}
src/api/company.js
0 → 100644
浏览文件 @
cfc8b2e0
import
request
from
'@/utils/request'
export
function
company_list
(
params
)
{
return
request
({
url
:
'/api/company'
,
method
:
'get'
,
params
})
}
export
function
company_save
(
data
)
{
return
request
({
url
:
'/api/company'
,
method
:
'post'
,
data
})
}
export
function
company_update
(
id
,
data
)
{
return
request
({
url
:
'/api/company/'
+
id
,
method
:
'put'
,
data
})
}
export
function
company_show
(
params
)
{
return
request
({
url
:
'/api/company/'
+
params
.
id
,
method
:
'get'
,
})
}
export
function
company_delete
(
data
)
{
return
request
({
url
:
'/api/company/'
+
data
.
id
,
method
:
'delete'
,
})
}
\ No newline at end of file
src/api/student.js
浏览文件 @
cfc8b2e0
...
...
@@ -12,7 +12,7 @@ import request from '@/utils/request'
//获取省市区信息
export
function
get_province_list
(
data
)
{
return
request
({
url
:
'/api/treeprovince'
,
url
:
'/api/treeprovince'
+
(
data
.
parent_id
?(
'/'
+
data
.
parent_id
):
''
)
,
method
:
'post'
,
data
})
...
...
src/api/system.js
浏览文件 @
cfc8b2e0
...
...
@@ -83,10 +83,11 @@ export function get_permission_tree(params) {
})
}
//获取菜单、按钮分类
export
function
get_permission_btn_menu
()
{
export
function
get_permission_btn_menu
(
params
)
{
return
request
({
url
:
`/api/permission`
,
method
:
'get'
,
params
})
}
//新增菜单、功能(按钮)
...
...
src/permission.js
浏览文件 @
cfc8b2e0
...
...
@@ -34,7 +34,7 @@ router.beforeEach(async (to, from, next) => {
}
else
{
try
{
await
store
.
dispatch
(
'user/getInfo'
)
const
accessRoutes
=
await
store
.
dispatch
(
'permission/generateRoutes'
)
const
accessRoutes
=
await
store
.
dispatch
(
'permission/generateRoutes'
,{
status
:
1
}
)
// console.log('路由数据');
// console.log(accessRoutes);
router
.
addRoutes
(
accessRoutes
)
...
...
src/settings.js
浏览文件 @
cfc8b2e0
module
.
exports
=
{
title
:
'烟草质检管理'
,
title
:
'数据管理'
,
// title: '烟草质检管理',
/**
* @type {boolean} true | false
...
...
src/store/modules/permission.js
浏览文件 @
cfc8b2e0
...
...
@@ -84,9 +84,9 @@ function transListToTreeData(list, rootValue) {
}
const
actions
=
{
generateRoutes
({
commit
})
{
generateRoutes
({
commit
}
,
data
)
{
return
new
Promise
(
async
resolve
=>
{
let
response
=
await
get_permission_btn_menu
();
let
response
=
await
get_permission_btn_menu
(
data
);
console
.
log
(
'从接口获取的路由数据'
);
console
.
log
(
response
);
/* route_tree_all(permission); //转为树结构 */
...
...
src/views/business/display_board/count.vue
0 → 100644
浏览文件 @
cfc8b2e0
<
template
>
<div
class=
"module_container"
>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
:key=
"key"
>
<el-row
:gutter=
"20"
>
<el-col
style=
"padding-top:10px"
:span=
"6"
>
<el-input
style=
"width: 60%;"
clearable
v-model=
"request_params.sampling_year"
placeholder=
"请输入抽检年份"
@
keydown
.
enter
.
native=
"getTableData"
></el-input>
<el-button
style=
"margin-left:10px;padding-top:10px"
type=
"primary"
icon=
"el-icon-search"
v-loading=
'is_loading'
@
click=
"getTableData()"
>
更新
</el-button>
</el-col>
<el-col
style=
"padding-top:10px"
:span=
"18"
>
<p
style=
"text-align:center;"
v-if=
"average_pass_rate"
>
<el-tag
style=
"margin-left:10px"
v-if=
"average_pass_rate.all"
>
全部合格率:
{{
average_pass_rate
.
all
.
qualified_count
}}
/
{{
average_pass_rate
.
all
.
sampling_count
}}
(
{{
average_pass_rate
.
all
.
pass_rate
}}
%)
</el-tag>
<el-tag
style=
"margin-left:10px"
v-if=
"average_pass_rate.handover"
>
交接合格率:
{{
average_pass_rate
.
handover
.
qualified_count
}}
/
{{
average_pass_rate
.
handover
.
sampling_count
}}
(
{{
average_pass_rate
.
handover
.
pass_rate
}}
%)
</el-tag>
<el-tag
style=
"margin-left:10px"
v-if=
"average_pass_rate.stock_up"
>
备货合格率:
{{
average_pass_rate
.
stock_up
.
qualified_count
}}
/
{{
average_pass_rate
.
stock_up
.
sampling_count
}}
(
{{
average_pass_rate
.
stock_up
.
pass_rate
}}
%)
</el-tag>
</p>
</el-col>
</el-row>
<el-form
ref=
"form"
label-width=
"100px"
>
<div
class=
"table_container"
>
<el-row
class=
"row_container"
>
<el-col
:span=
"12"
>
<div
class=
"centenr_container"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"抽检批次"
><el-input
v-model=
"request_params.t1_sampling_batch"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入抽检批次"
></el-input></el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"平均合格率"
>
<el-input
style=
"width:80%;margin-right:10px"
v-model=
"request_params.t1_average_batch_qualification_rate"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入平均合格率"
></el-input>
<el-checkbox
v-model=
"request_params.t1_is_average_batch_qualification_rate"
@
change=
"getTableData"
title=
"是否使用年度平局合格率"
></el-checkbox>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"单批次合格率"
><el-input
v-model=
"request_params.t1_single_batch"
placeholder=
"请输入单批次合格率"
></el-input></el-form-item>
</el-col>
</el-row>
<AnalyseModule
:module_data=
"quality_tobacco_areas"
v-if=
"quality_tobacco_areas"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"centenr_container"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"抽检批次"
><el-input
v-model=
"request_params.t2_sampling_batch"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入抽检批次"
></el-input></el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"抽检烟草等级"
>
<el-select
style=
"float: left;width:70%;margin-right:3px"
collapse-tags
v-model=
"request_params.t2_tobacco_grade"
multiple
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in tobacco_grades_data"
:key=
"index"
:label=
"index"
:value=
"index"
></el-option>
</el-select>
>
<el-input
style=
"width:24%;float: right;"
v-model=
"request_params.t2_tobacco_grade_proportion"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入平均合格率"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"单批次合格率"
><el-input
v-model=
"request_params.t2_single_batch"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入抽检批次"
></el-input></el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"平均合格率"
>
<el-input
style=
"width:80%;margin-right:10px"
v-model=
"request_params.t2_average_all"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入平均合格率"
></el-input>
<el-checkbox
v-model=
"request_params.t2_is_average_all"
@
change=
"getTableData"
title=
"是否使用年度平局合格率"
></el-checkbox>
</el-form-item>
</el-col>
</el-row>
<AnalyseModule
:module_data=
"list_industrial_enterprises"
v-if=
"list_industrial_enterprises"
>
</AnalyseModule>
</div>
</el-col>
</el-row>
<el-row
class=
"row_container"
>
<el-col
:span=
"12"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"mixed_non_neighbor_level"
v-if=
"mixed_non_neighbor_level"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"MixedHeight"
v-if=
"MixedHeight"
>
</AnalyseModule>
</div>
<!--
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"TobaccoProducingProvinces"
v-if=
"TobaccoProducingProvinces"
>
</AnalyseModule>
</div>
-->
</el-col>
</el-row>
<!-- 总表--商业 -->
<el-row
class=
"row_container"
>
<el-col
:span=
"24"
>
<div
class=
"centenr_container"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"合格率区间1"
>
<el-input
style=
"width:48%;float: left;"
v-model=
"field.qualification_rate_interval1.min"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入合格率区间1小值"
></el-input>
-
<el-input
style=
"width:48%"
v-model=
"field.qualification_rate_interval1.max"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入合格率区间1大值"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"合格率区间2"
>
<el-input
style=
"width:48%;float: left;"
v-model=
"field.qualification_rate_interval2.min"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入合格率区间2小值"
></el-input>
-
<el-input
style=
"width:48%"
v-model=
"field.qualification_rate_interval2.max"
@
keydown
.
enter
.
native=
"getTableData"
placeholder=
"请输入合格率区间2大值"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"桔混柠"
>
<el-switch
v-model=
"field.mixed_f.is_all"
@
change=
"getTableData"
active-text=
"桔色/总把数"
inactive-text=
"柠色/总桔色"
>
</el-switch>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"柠混桔"
>
<el-switch
v-model=
"field.mixed_l.is_all"
@
change=
"getTableData"
active-text=
"柠色/总把数"
inactive-text=
"桔色/总柠色"
>
</el-switch>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"交接类型"
>
<el-select
style=
"float: left;width:70%;margin-right:3px"
@
change=
"getTableData"
v-model=
"request_params.unit_category"
placeholder=
"请选择"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"备货"
value=
"备货"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-popover
v-model=
'is_popover'
placement=
"right"
width=
"600"
trigger=
"click"
>
<el-tabs
v-model=
"activeName"
type=
"card"
>
<el-tab-pane
label=
"基础字段"
name=
"field"
style=
"overflow: auto;height: 500px;"
>
<div
v-for=
"(i,index) in field"
:key=
"index"
class=
"text item"
>
<el-row
style=
"padding:4px 0px;border-bottom: 1px solid #f1f1f1;"
>
<el-col
:span=
"8"
>
{{
i
.
label
}}
</el-col>
<el-col
:span=
"8"
><el-switch
v-model=
"i.is_show"
active-text=
"是"
inactive-text=
"否"
>
</el-switch></el-col>
<el-col
:span=
"8"
>
<div
v-if=
"i.type"
>
<el-radio
v-model=
"i.type"
label=
"num"
>
数值
</el-radio>
<el-radio
v-model=
"i.type"
label=
"percentage"
>
百分百
</el-radio>
</div>
</el-col>
</el-row>
</div>
</el-tab-pane>
<el-tab-pane
label=
"大等级字段"
name=
"large_scale"
style=
"overflow: auto;height: 500px;"
>
<div
v-for=
"(i,index) in large_scale"
:key=
"index"
class=
"text item"
>
<el-row
style=
"padding:4px 0px;border-bottom: 1px solid #f1f1f1;"
>
<el-col
:span=
"8"
>
{{
index
}}
</el-col>
<el-col
:span=
"8"
><el-switch
v-model=
"i.is_show"
active-text=
"是"
inactive-text=
"否"
>
</el-switch></el-col>
</el-row>
</div>
</el-tab-pane>
<el-tab-pane
label=
"部位字段"
name=
"position"
style=
"overflow: auto;height: 500px;"
>
<div
v-for=
"(i,index) in position"
:key=
"index"
class=
"text item"
>
<el-row
style=
"padding:4px 0px;border-bottom: 1px solid #f1f1f1;"
>
<el-col
:span=
"8"
>
{{
index
}}
</el-col>
<el-col
:span=
"8"
><el-switch
v-model=
"i.is_show"
active-text=
"是"
inactive-text=
"否"
>
</el-switch></el-col>
</el-row>
</div>
</el-tab-pane>
<el-tab-pane
label=
"色组"
name=
"grade2"
style=
"overflow: auto;height: 500px;"
>
<div
v-for=
"(i,index) in grade2"
:key=
"index"
class=
"text item"
>
<el-row
style=
"padding:4px 0px;border-bottom: 1px solid #f1f1f1;"
>
<el-col
:span=
"8"
>
{{
index
}}
</el-col>
<el-col
:span=
"8"
><el-switch
v-model=
"i.is_show"
active-text=
"是"
inactive-text=
"否"
>
</el-switch></el-col>
</el-row>
</div>
</el-tab-pane>
<el-tab-pane
label=
"烟草等级"
name=
"tobacco_grades_data"
style=
"overflow: auto;height: 500px;"
>
<div
v-for=
"(i,index) in tobacco_grades_data"
:key=
"index"
class=
"text item"
>
<el-row
style=
"padding:4px 0px;border-bottom: 1px solid #f1f1f1;"
>
<el-col
:span=
"8"
>
{{
index
}}
</el-col>
<el-col
:span=
"8"
><el-switch
v-model=
"i.is_show"
active-text=
"是"
inactive-text=
"否"
>
</el-switch></el-col>
</el-row>
</div>
</el-tab-pane>
</el-tabs>
<div
style=
"text-align:right"
>
<el-button
@
click=
"is_popover=false;getTableData()"
>
刷新
</el-button>
</div>
<el-button
slot=
"reference"
>
显示设置
</el-button>
</el-popover>
</el-col>
</el-row>
<AnalyseModule
:module_data=
"tobacco_business_all"
v-if=
"tobacco_business_all"
>
</AnalyseModule>
</div>
</el-col>
</el-row>
<!--总表--工业 tobacco_industry_all -->
<el-row
class=
"row_container"
>
<el-col
:span=
"24"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"tobacco_industry_all"
v-if=
"tobacco_industry_all"
>
</AnalyseModule>
</div>
</el-col>
</el-row>
</div>
</el-form>
</el-card>
</div>
</div>
</
template
>
<
script
>
import
TableHead
from
'@/components/TableHead/index'
;
import
{
industry_commerce_handover_count
}
from
'@/api/business'
;
import
AnalyseModule
from
'@/components/AnalyseModule/index.vue'
;
import
{
exportText
}
from
'@/utils/tool.js'
;
const
search_def_data
=
{
sampling_year
:(
new
Date
()).
getUTCFullYear
(),
//抽检年份
t1_sampling_batch
:
8
,
//抽检批次
t1_average_batch_qualification_rate
:
60
,
// 交接平均值
t1_is_average_batch_qualification_rate
:
true
,
// 使用当前年的平均值
t1_single_batch
:
40
,
t2_sampling_batch
:
10
,
// 抽检批次
t2_tobacco_grade
:[
"C2F"
,
"C3F"
,
"B1F"
,
"C3L"
],
// 抽检烟草等级
t2_tobacco_grade_proportion
:
20
,
//抽检等级合格率
t2_average_all
:
64
,
// 平均合格率
t2_is_average_all
:
true
,
// 总体合格率使用当前年份的合格
t2_single_batch
:
35
,
// 单批次合格率
unit_category
:
''
,
// 交接类型
}
const
fieldDefault
=
{
"tobacco_origin_provinces"
:{
"is_show"
:
true
,
label
:
"产烟省"
},
"tobacco_origin_city"
:{
"is_show"
:
false
,
label
:
"产烟地市"
},
"num"
:{
"is_show"
:
true
,
label
:
"抽检批次"
},
"number_mixed_levels"
:{
"is_show"
:
true
,
label
:
"混等级个数"
,
type
:
'percentage'
},
"mixed_non_neighbor_level_number"
:{
"is_show"
:
true
,
label
:
"混非近邻等级把数"
,
type
:
'percentage'
},
"mixed_neighbor_level_number"
:{
"is_show"
:
true
,
label
:
"混近邻等级把数"
,
type
:
'percentage'
},
"mixed_high"
:{
"is_show"
:
true
,
label
:
"混高"
,
type
:
'percentage'
},
"mixed_low"
:{
"is_show"
:
true
,
label
:
"混低"
,
type
:
'percentage'
},
"mixed_group"
:{
"is_show"
:
true
,
label
:
"混组"
,
type
:
'percentage'
},
"mixed_parts"
:{
"is_show"
:
true
,
label
:
"混部位"
,
type
:
'percentage'
},
"mixed_f"
:{
"is_show"
:
true
,
"is_all"
:
false
,
label
:
"桔混柠"
,
type
:
'percentage'
},
"mixed_l"
:{
"is_show"
:
true
,
"is_all"
:
false
,
label
:
"柠混桔"
,
type
:
'percentage'
},
"mixed_r"
:{
"is_show"
:
true
,
label
:
"混R"
,
type
:
'percentage'
},
"mixed_k"
:{
"is_show"
:
true
,
label
:
"混K"
,
type
:
'percentage'
},
"mixed_s"
:{
"is_show"
:
true
,
label
:
"混S"
,
type
:
'percentage'
},
"mixed_gy_v"
:{
"is_show"
:
true
,
label
:
"混GY+V"
,
type
:
'percentage'
},
"mixed_superior"
:{
"is_show"
:
true
,
label
:
"混上等"
,
type
:
'percentage'
},
"mixed_medium"
:{
"is_show"
:
true
,
label
:
"混中等"
,
type
:
'percentage'
},
"mixed_inferior"
:{
"is_show"
:
true
,
label
:
"混下等"
,
type
:
'percentage'
},
"shui_chao"
:{
"is_show"
:
true
,
label
:
"水超"
,
type
:
'percentage'
},
"pressure_oil"
:{
"is_show"
:
true
,
label
:
"压油"
,
type
:
'percentage'
},
"mildew"
:{
"is_show"
:
true
,
label
:
"霉变"
,
type
:
'percentage'
},
"out_class"
:{
"is_show"
:
true
,
label
:
"级外"
,
type
:
'percentage'
},
"mixed_upper"
:{
"is_show"
:
true
,
label
:
"混上部"
,
type
:
'percentage'
},
"mixed_central"
:{
"is_show"
:
true
,
label
:
"混中部"
,
type
:
'percentage'
},
"mixed_lower_part"
:{
"is_show"
:
true
,
label
:
"混下部"
,
type
:
'percentage'
},
"qualification_rate_interval1"
:{
"is_show"
:
true
,
"max"
:
40
,
"min"
:
30
,
label
:
"合格率区间1"
},
"qualification_rate_interval2"
:{
"is_show"
:
true
,
"max"
:
50
,
"min"
:
40
,
label
:
"合格率区间2"
},
}
const
large_scaleDefault
=
{
"上等"
:{
"is_show"
:
true
},
"下等"
:{
"is_show"
:
true
},
"中等"
:{
"is_show"
:
true
},
}
const
positionDefault
=
{
"B"
:{
"is_show"
:
false
},
"C"
:{
"is_show"
:
false
},
"X"
:{
"is_show"
:
false
},
}
const
grade2Default
=
{
"BF"
:{
"is_show"
:
false
},
"BK"
:{
"is_show"
:
false
},
"BL"
:{
"is_show"
:
false
},
"BR"
:{
"is_show"
:
false
},
"BV"
:{
"is_show"
:
false
},
"CF"
:{
"is_show"
:
false
},
"CL"
:{
"is_show"
:
false
},
"CV"
:{
"is_show"
:
false
},
"CXK"
:{
"is_show"
:
false
},
"GY"
:{
"is_show"
:
false
},
"HF"
:{
"is_show"
:
false
},
"S"
:{
"is_show"
:
false
},
"XF"
:{
"is_show"
:
false
},
"XL"
:{
"is_show"
:
false
},
"XV"
:{
"is_show"
:
false
},
}
const
tobacco_grades_dataDefault
=
{
"B1F"
:{
"is_show"
:
false
},
"B1K"
:{
"is_show"
:
false
},
"B1L"
:{
"is_show"
:
false
},
"B1R"
:{
"is_show"
:
false
},
"B2F"
:{
"is_show"
:
false
},
"B2K"
:{
"is_show"
:
false
},
"B2L"
:{
"is_show"
:
false
},
"B2R"
:{
"is_show"
:
false
},
"B2V"
:{
"is_show"
:
false
},
"B3F"
:{
"is_show"
:
false
},
"B3K"
:{
"is_show"
:
false
},
"B3L"
:{
"is_show"
:
false
},
"B3R"
:{
"is_show"
:
false
},
"B3V"
:{
"is_show"
:
false
},
"B4F"
:{
"is_show"
:
false
},
"B4L"
:{
"is_show"
:
false
},
"C1F"
:{
"is_show"
:
false
},
"C1L"
:{
"is_show"
:
false
},
"C2F"
:{
"is_show"
:
true
},
"C2L"
:{
"is_show"
:
false
},
"C3F"
:{
"is_show"
:
true
},
"C3L"
:{
"is_show"
:
false
},
"C3V"
:{
"is_show"
:
false
},
"C4F"
:{
"is_show"
:
false
},
"C4L"
:{
"is_show"
:
false
},
"CX1K"
:{
"is_show"
:
false
},
"CX2K"
:{
"is_show"
:
false
},
"GY1"
:{
"is_show"
:
false
},
"GY2"
:{
"is_show"
:
false
},
"H1F"
:{
"is_show"
:
false
},
"H2F"
:{
"is_show"
:
false
},
"S1"
:{
"is_show"
:
false
},
"S2"
:{
"is_show"
:
false
},
"X1F"
:{
"is_show"
:
false
},
"X1L"
:{
"is_show"
:
false
},
"X2F"
:{
"is_show"
:
false
},
"X2L"
:{
"is_show"
:
false
},
"X2V"
:{
"is_show"
:
false
},
"X3F"
:{
"is_show"
:
false
},
"X3L"
:{
"is_show"
:
false
},
"X4F"
:{
"is_show"
:
false
},
"X4L"
:{
"is_show"
:
false
},
}
export
default
{
data
()
{
return
{
key
:
Math
.
random
(),
activeName
:
'field'
,
// 年度平均值
average_pass_rate
:
null
,
IP
:
process
.
env
.
VUE_APP_BASE_API
,
//初始化请求参数
request_params
:
Object
.
assign
({},
search_def_data
),
is_loading
:
false
,
//年度备货和调出烟叶等级质量较好的烟叶产区
quality_tobacco_areas
:
null
,
// 表格2 的数据 严把调入烟叶等级质量关的卷烟工业企业名单
list_industrial_enterprises
:
null
,
//提供抽检烟叶等级中混高比例严重的产地和等级
MixedHeight
:
null
,
//混非近邻等级比较严重的产区和等级
mixed_non_neighbor_level
:
null
,
//各有关省(区、市)烟叶工商交接等级合格率抽检情况
TobaccoProducingProvinces
:
null
,
// 各产烟地市烟叶工商交接等级合格率抽检情况
// TobaccoProducingcity:null,
// // 商业经营单位备货烟叶等级质量抽检情况
// CommercialUnits:null,
// // 各有关省(区、市)抽检工商交接烟叶的有关混等混级统计
// check_provinces:null,
// // 各有关省(区、市)抽检工商交接烟叶的混等混级比例
// check_provinces_proportion:null,
// // 各产烟地市烟叶工商交接等级质量抽检情况
// check_city_proportion:null,
field
:
Object
.
assign
({},
fieldDefault
),
large_scale
:
Object
.
assign
({},
large_scaleDefault
),
position
:
Object
.
assign
({},
positionDefault
),
grade2
:
Object
.
assign
({},
grade2Default
),
tobacco_grades_data
:
Object
.
assign
({},
tobacco_grades_dataDefault
),
// 总表--商业
tobacco_business_all
:
null
,
all_data
:
null
,
// 总表-工业
tobacco_industry_all
:
null
,
is_popover
:
false
};
},
components
:
{
TableHead
,
AnalyseModule
},
computed
:
{},
mounted
()
{
this
.
init
()
},
methods
:
{
getTableData
(){
this
.
is_loading
=
true
industry_commerce_handover_count
({
...
this
.
request_params
,
field
:{
...
this
.
field
,
...
this
.
large_scale
,
...
this
.
position
,
...
this
.
grade2
,
...
this
.
tobacco_grades_data
,
}
}).
then
(
res
=>
{
this
.
all_data
=
res
this
.
quality_tobacco_areas
=
this
.
quality_tobacco_areas_fun
(
res
.
quality_tobacco_areas
)
//年度备货和调出烟叶等级质量较好的烟叶产区
this
.
list_industrial_enterprises
=
this
.
list_industrial_enterprises_fun
(
res
.
list_industrial_enterprises
)
//年度备货和调出烟叶等级质量较好的烟叶产区
this
.
average_pass_rate
=
res
.
average_pass_rate
//年度备货和调出烟叶等级质量较好的烟叶产区
this
.
MixedHeight
=
this
.
MixedHeight_fun
(
res
.
MixedHeight
)
//提供抽检烟叶等级中混高比例严重的产地和等级
this
.
mixed_non_neighbor_level
=
this
.
mixed_non_neighbor_level_fun
(
res
.
mixed_non_neighbor_level
)
//混非近邻等级比较严重的产区和等级
this
.
TobaccoProducingProvinces
=
this
.
TobaccoProducingProvinces_fun
(
res
.
TobaccoProducingProvinces
)
//各有关省(区、市)烟叶工商交接等级合格率抽检情况
// this.TobaccoProducingcity=this.TobaccoProducingcity_fun(res.TobaccoProducingcity)// 各产烟地市烟叶工商交接等级合格率抽检情况
// this.CommercialUnits=this.CommercialUnits_fun(res.CommercialUnits)// 商业经营单位备货烟叶等级质量抽检情况
// this.check_provinces=this.check_provinces_fun(res.check_provinces)// 各有关省(区、市)抽检工商交接烟叶的有关混等混级统计
// this.check_provinces_proportion=this.check_provinces_proportion_fun(res.check_provinces_proportion)// 各有关省(区、市)抽检工商交接烟叶的混等混级比例
// this.check_city_proportion=this.check_city_proportion_fun(res.check_city_proportion)// 各产烟地市烟叶工商交接等级质量抽检情况
this
.
tobacco_business_all
=
this
.
tobacco_business_all_fun
(
this
.
all_data
.
tobacco_business_all
)
// 各产烟地市烟叶工商交接等级质量抽检情况
this
.
tobacco_industry_all
=
this
.
tobacco_industry_all_fun
(
this
.
all_data
.
tobacco_industry_all
)
// 各产烟地市烟叶工商交接等级质量抽检情况
this
.
key
=
Math
.
random
()
this
.
is_loading
=
false
})
},
init
()
{
this
.
request_params
=
Object
.
assign
({},
search_def_data
);
this
.
getTableData
();
},
//年度备货和调出烟叶等级质量较好的烟叶产区 #39c183f0
quality_tobacco_areas_fun
(
datas
)
{
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'省份'
,
key
:
'province'
},
{
label
:
'地市级产区'
,
key
:
'areas'
},
];
for
(
let
i
in
datas
){
list
.
push
({
"province"
:
i
,
"areas"
:
datas
[
i
].
join
(
" , "
)
,
});
}
return
{
type
:
'table'
,
chart_id
:
'quality_tobacco_areas'
,
color
:
'#39c183f0'
,
title
:
'年度备货和调出烟叶等级质量较好的烟叶产区'
,
print_id
:
'quality_tobacco_areas'
,
labers
,
list
,
};
},
list_industrial_enterprises_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'相关单位'
,
key
:
'province'
},
];
for
(
let
i
in
datas
){
list
.
push
({
"province"
:
datas
[
i
],
});
}
return
{
type
:
'table'
,
chart_id
:
'list_industrial_enterprises'
,
color
:
'#F56C6C'
,
title
:
'严把调入烟叶等级质量关的卷烟工业企业名单'
,
print_id
:
'list_industrial_enterprises'
,
labers
,
list
,
};
},
//一、 提供抽检烟叶等级中混高比例严重的产地和等级 #99A9BF
MixedHeight_fun
(
datas
)
{
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'检查地点'
,
key
:
'check_address'
},
{
label
:
'产烟地市'
,
key
:
'tobacco_origin_city'
},
{
label
:
'原等级'
,
key
:
'sampling_grade'
},
{
label
:
'抽把数量'
,
key
:
'sampling_count'
},
{
label
:
'合格把数'
,
key
:
'qualified_count'
},
{
label
:
'合格率%'
,
key
:
'qualification_rate'
},
{
label
:
'混等级/把数'
,
key
:
'mixed_highdata'
},
{
label
:
'混高把数'
,
key
:
'mixed_high'
},
{
label
:
'混高比例%'
,
key
:
'mixed_high_proportion'
},
{
label
:
'备注'
,
key
:
'remark1'
},
];
for
(
let
i
in
datas
){
let
s
=
{...
datas
[
i
]};
let
mixed_highdata
=
[];
for
(
let
mh
in
datas
[
i
].
mixed_highdata
){
mixed_highdata
.
push
(
mh
+
"/"
+
datas
[
i
].
mixed_highdata
[
mh
])
}
s
.
mixed_highdata
=
mixed_highdata
.
join
(
','
)
list
.
push
(
s
);
}
return
{
type
:
'table'
,
chart_id
:
'MixedHeight'
,
color
:
'#99A9BF'
,
title
:
'提供抽检烟叶等级中混高比例严重的产地和等级'
,
print_id
:
'MixedHeight'
,
labers
,
list
,
};
},
//二、混非近邻等级比较严重的产区和等级 #E6A23C
mixed_non_neighbor_level_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'产烟地市或县'
,
key
:
'tobacco_origin_city'
},
{
label
:
'等级'
,
key
:
'sampling_grade'
},
{
label
:
'抽检把数'
,
key
:
'sampling_count'
},
{
label
:
'合格率%'
,
key
:
'qualified_count'
},
{
label
:
'混级/把数'
,
key
:
'mixed_non_neighbor_level'
},
{
label
:
'混非近邻把数'
,
key
:
'mixed_non_neighbor_level_number'
},
{
label
:
'混非近邻比例%'
,
key
:
'mixed_non_neighbor_level_number_proportion'
},
{
label
:
'接收或备货单位'
,
key
:
'check_address'
},
];
for
(
let
i
in
datas
){
let
s
=
{...
datas
[
i
]};
let
mixed_non_neighbor_level
=
[];
for
(
let
mh
in
datas
[
i
].
mixed_non_neighbor_level
){
mixed_non_neighbor_level
.
push
(
mh
+
"/"
+
datas
[
i
].
mixed_non_neighbor_level
[
mh
])
}
s
.
mixed_non_neighbor_level
=
mixed_non_neighbor_level
.
join
(
','
)
list
.
push
(
s
);
}
return
{
type
:
'table'
,
chart_id
:
'mixed_non_neighbor_level'
,
color
:
'#E6A23C'
,
title
:
'混非近邻等级比较严重的产区和等级'
,
print_id
:
'mixed_non_neighbor_level'
,
labers
,
list
,
};
},
//TODO 表1 各有关省(区、市)烟叶工商交接等级合格率抽检情况 #505F79
TobaccoProducingProvinces_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'产烟省份'
,
key
:
'tobacco_origin_provinces'
},
{
label
:
'抽检批次'
,
key
:
'num'
},
{
label
:
'抽检把数'
,
key
:
'sampling_count'
},
{
label
:
'合格把数'
,
key
:
'qualified_count'
},
{
label
:
'合格率%'
,
key
:
'qualification_rate'
},
];
for
(
let
i
in
datas
.
table_data
){
let
s
=
{...
datas
.
table_data
[
i
]};
list
.
push
(
s
);
}
list
.
push
({...
datas
.
total
,
'tobacco_origin_provinces'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'TobaccoProducingProvinces'
,
color
:
'#505F79'
,
title
:
'各有关省(区、市)烟叶工商交接等级合格率抽检情况'
,
print_id
:
'TobaccoProducingProvinces'
,
labers
,
list
,
};
},
//TODO 表2 各产烟地市烟叶工商交接等级合格率抽检情况 #529B2E
TobaccoProducingcity_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'产烟省份'
,
key
:
'tobacco_origin_provinces'
},
{
label
:
'产烟地市'
,
key
:
'tobacco_origin_city'
},
{
label
:
'抽检批次'
,
key
:
'num'
},
{
label
:
'抽检把数'
,
key
:
'sampling_count'
},
{
label
:
'合格把数'
,
key
:
'qualified_count'
},
{
label
:
'合格率%'
,
key
:
'qualification_rate'
},
];
for
(
let
i
in
datas
.
table_data
){
let
s
=
{...
datas
.
table_data
[
i
]};
list
.
push
(
s
);
}
list
.
push
({...
datas
.
total
,
'tobacco_origin_city'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'TobaccoProducingcity'
,
color
:
'#529B2E'
,
title
:
'各产烟地市烟叶工商交接等级合格率抽检情况'
,
print_id
:
'TobaccoProducingcity'
,
labers
,
list
,
};
},
//TODO 表3 商业经营单位备货烟叶等级质量抽检情况 #99A9BF
CommercialUnits_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'单位'
,
key
:
"check_address"
},
{
label
:
'批次'
,
key
:
"num"
},
{
label
:
'抽检把数'
,
key
:
"sampling_count"
},
{
label
:
'合格率%'
,
key
:
"qualified_count"
},
{
label
:
'均混级数'
,
key
:
"number_mixed_levels_proportion"
},
{
label
:
'混高%'
,
key
:
"mixed_high_proportion"
},
{
label
:
'混低%'
,
key
:
"mixed_low_proportion"
},
{
label
:
'GY+V%'
,
key
:
"mixed_gy_v_proportion"
},
{
label
:
'混组%'
,
key
:
"mixed_group_proportion"
},
{
label
:
'混部位%'
,
key
:
"mixed_parts_proportion"
},
{
label
:
'桔混柠%'
,
key
:
"mixed_f_proportion"
},
{
label
:
'柠混桔%'
,
key
:
"mixed_l_proportion"
},
];
for
(
let
i
in
datas
.
table_data
){
let
s
=
{...
datas
.
table_data
[
i
]};
list
.
push
(
s
);
}
list
.
push
({...
datas
.
total
,
'check_address'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'CommercialUnits'
,
color
:
'#F56C6C'
,
title
:
'商业经营单位备货烟叶等级质量抽检情况'
,
print_id
:
'CommercialUnits'
,
labers
,
list
,
};
},
//TODO 表4 工业企业已接收烟叶等级质量抽检情况 #F56C6C
industrycialUnits_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'单位'
,
key
:
"check_address"
},
{
label
:
'批次'
,
key
:
"num"
},
{
label
:
'抽检把数'
,
key
:
"sampling_count"
},
{
label
:
'合格率%'
,
key
:
"qualified_count"
},
{
label
:
'均混级数'
,
key
:
"number_mixed_levels_proportion"
},
{
label
:
'混高%'
,
key
:
"mixed_high_proportion"
},
{
label
:
'混低%'
,
key
:
"mixed_low_proportion"
},
{
label
:
'GY+V%'
,
key
:
"mixed_gy_v_proportion"
},
{
label
:
'混组%'
,
key
:
"mixed_group_proportion"
},
{
label
:
'混部位%'
,
key
:
"mixed_parts_proportion"
},
{
label
:
'桔混柠%'
,
key
:
"mixed_f_proportion"
},
{
label
:
'柠混桔%'
,
key
:
"mixed_l_proportion"
},
];
for
(
let
i
in
datas
.
table_data
){
let
s
=
{...
datas
.
table_data
[
i
]};
list
.
push
(
s
);
}
list
.
push
({...
datas
.
total
,
'check_address'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'CommercialUnits'
,
color
:
'#F56C6C'
,
title
:
'商业经营单位备货烟叶等级质量抽检情况'
,
print_id
:
'CommercialUnits'
,
labers
,
list
,
};
},
//TODO 表5 各有关省(区、市)工商交接烟叶不同组别等级合格率(%)比较 #E6A23C
// 表6 各有关省(区、市)抽检工商交接烟叶的有关混等混级统计 #39c183f0
check_provinces_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'省份'
,
key
:
"check_provinces"
},
{
label
:
'总批次'
,
key
:
"num"
},
// { label: '均混级数',key:"check_address"},
{
label
:
'总把数'
,
key
:
"sampling_count"
},
{
label
:
'S'
,
key
:
"mixed_s"
},
{
label
:
'K'
,
key
:
"mixed_k"
},
{
label
:
'霉变'
,
key
:
"mildew"
},
{
label
:
'混非近邻等级%'
,
key
:
"mixed_non_neighbor_level_number_proportion"
},
{
label
:
'桔混柠%'
,
key
:
"mixed_f_proportion"
},
{
label
:
'柠混桔%'
,
key
:
"mixed_l_proportion"
},
];
for
(
let
i
in
datas
.
table_data
){
let
s
=
{...
datas
.
table_data
[
i
]};
list
.
push
(
s
);
}
list
.
push
({...
datas
.
total
,
'check_provinces'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'check_provinces'
,
color
:
'#39c183f0'
,
title
:
'各有关省(区、市)抽检工商交接烟叶的有关混等混级统计'
,
print_id
:
'check_provinces'
,
labers
,
list
,
};
},
// 表7 各有关省(区、市)抽检工商交接烟叶的混等混级比例 #505F79
check_provinces_proportion_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'省份'
,
key
:
"check_provinces"
},
{
label
:
'总批次'
,
key
:
"num"
},
{
label
:
'抽检把数'
,
key
:
"sampling_count"
},
{
label
:
'混高(把)'
,
key
:
"mixed_high"
},
{
label
:
'混高(%)'
,
key
:
"mixed_high_proportion"
},
{
label
:
'混低(把)'
,
key
:
"mixed_low"
},
{
label
:
'混低(%)'
,
key
:
"mixed_low_proportion"
},
{
label
:
'混组(把)'
,
key
:
"mixed_group"
},
{
label
:
'混组(%)'
,
key
:
"mixed_group_proportion"
},
{
label
:
'混部位(把)'
,
key
:
"mixed_parts"
},
{
label
:
'混部位(%)'
,
key
:
"mixed_parts_proportion"
},
{
label
:
'混V+GY(把)'
,
key
:
"mixed_gy_v"
},
{
label
:
'混V+GY(%)'
,
key
:
"mixed_gy_v_proportion"
},
];
for
(
let
i
in
datas
.
table_data
){
let
s
=
{...
datas
.
table_data
[
i
]};
list
.
push
(
s
);
}
list
.
push
({...
datas
.
total
,
'check_provinces'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'check_provinces_proportion'
,
color
:
'#505F79'
,
title
:
'各有关省(区、市)抽检工商交接烟叶的有关混等混级统计'
,
print_id
:
'check_provinces_proportion'
,
labers
,
list
,
};
},
// 表8 各产烟地市烟叶工商交接等级质量抽检情况 #E6A23C
check_city_proportion_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[
{
label
:
'省份'
,
key
:
"check_provinces"
},
{
label
:
'产地'
,
key
:
"check_city"
},
{
label
:
'批次'
,
key
:
"num"
},
{
label
:
'混高'
,
key
:
"mixed_high"
},
{
label
:
'混低'
,
key
:
"mixed_low"
},
{
label
:
'V+GY'
,
key
:
"mixed_gy_v_proportion"
},
{
label
:
'混组'
,
key
:
"mixed_group"
},
{
label
:
'混部位'
,
key
:
"mixed_parts"
},
{
label
:
'桔混柠%'
,
key
:
"mixed_f_proportion"
},
{
label
:
'柠混桔%'
,
key
:
"mixed_l_proportion"
},
{
label
:
'混非近邻%'
,
key
:
"mixed_non_neighbor_level_number_proportion"
},
{
label
:
'合格率区间批数(40~49)'
,
key
:
"qualification_rate_40_49"
},
{
label
:
'合格率区间批数(30~39)'
,
key
:
"qualification_rate_30_39"
},
];
for
(
let
i
in
datas
.
table_data
){
let
s
=
{...
datas
.
table_data
[
i
]};
list
.
push
(
s
);
}
list
.
push
({...
datas
.
total
,
'check_city'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'check_city_proportion'
,
color
:
'#E6A23C'
,
title
:
'各有关省(区、市)抽检工商交接烟叶的有关混等混级统计'
,
print_id
:
'check_city_proportion'
,
labers
,
list
,
};
},
//TODO 表9 有关省级局抽查与国家局抽查的烟叶等级合格率(%)比较 #F56C6C
// 总表 --商业
tobacco_business_all_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[]
for
(
let
i
in
this
.
field
){
if
(
this
.
field
[
i
].
is_show
)
labers
.
push
({
label
:
this
.
field
[
i
].
label
||
i
,
key
:
i
});
}
let
nf
=
{
...
this
.
large_scale
,
...
this
.
position
,
...
this
.
grade2
,
...
this
.
tobacco_grades_data
,
}
for
(
let
i
in
nf
){
if
(
nf
[
i
].
is_show
)
labers
.
push
({
label
:
nf
[
i
].
label
||
i
,
key
:
i
});
}
for
(
let
i
in
datas
.
table_data
){
let
item
=
JSON
.
parse
(
JSON
.
stringify
(
datas
.
table_data
[
i
]))
for
(
let
f
in
this
.
field
){
if
(
item
[
f
]
&&
this
.
field
[
f
].
type
){
item
[
f
]
=
item
[
f
][
this
.
field
[
f
].
type
]
}
}
for
(
let
f
in
nf
){
if
(
item
[
f
]
&&
item
[
f
].
sampling_count
>
0
&&
item
[
f
].
qualified_count
>
0
){
item
[
f
]
=
((
item
[
f
].
qualified_count
/
item
[
f
].
sampling_count
)
*
100
).
toFixed
(
2
)
}
}
let
s
=
{...
item
};
list
.
push
(
s
);
}
let
total
=
JSON
.
parse
(
JSON
.
stringify
(
datas
.
total
))
for
(
let
f
in
nf
){
if
(
total
[
f
]
&&
total
[
f
].
sampling_count
>
0
&&
total
[
f
].
qualified_count
>
0
){
total
[
f
]
=
((
total
[
f
].
qualified_count
/
total
[
f
].
sampling_count
)
*
100
).
toFixed
(
2
)
}
else
if
(
total
[
f
]
&&
total
[
f
].
sampling_count
==
0
||
total
[
f
].
qualified_count
==
0
){
total
[
f
]
=
0
}
}
for
(
let
f
in
this
.
field
){
if
(
total
[
f
]
&&
this
.
field
[
f
].
type
){
total
[
f
]
=
total
[
f
][
this
.
field
[
f
].
type
]
}
}
list
.
push
({...
total
,
'tobacco_origin_provinces'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'tobacco_business_all'
,
color
:
'#39c183f0'
,
title
:
'商业,备货统计'
,
print_id
:
'tobacco_business_all'
,
labers
,
list
,
};
},
// 总表 --商业
tobacco_industry_all_fun
(
datas
){
if
(
!
datas
)
return
false
;
let
list
=
[];
let
labers
=
[{
label
:
'接收单位'
,
key
:
"accepting_unit"
}]
for
(
let
i
in
this
.
field
){
if
(
this
.
field
[
i
].
is_show
&&
i
!=
'tobacco_origin_provinces'
&&
i
!=
'tobacco_origin_city'
)
labers
.
push
({
label
:
this
.
field
[
i
].
label
||
i
,
key
:
i
});
}
let
nf
=
{
...
this
.
large_scale
,
...
this
.
position
,
...
this
.
grade2
,
...
this
.
tobacco_grades_data
,
}
for
(
let
i
in
nf
){
if
(
nf
[
i
].
is_show
)
labers
.
push
({
label
:
nf
[
i
].
label
||
i
,
key
:
i
});
}
for
(
let
i
in
datas
.
table_data
){
let
item
=
JSON
.
parse
(
JSON
.
stringify
(
datas
.
table_data
[
i
]))
for
(
let
f
in
this
.
field
){
if
(
item
[
f
]
&&
this
.
field
[
f
].
type
){
item
[
f
]
=
item
[
f
][
this
.
field
[
f
].
type
]
}
}
for
(
let
f
in
nf
){
if
(
item
[
f
]
&&
item
[
f
].
sampling_count
>
0
&&
item
[
f
].
qualified_count
>
0
){
item
[
f
]
=
((
item
[
f
].
qualified_count
/
item
[
f
].
sampling_count
)
*
100
).
toFixed
(
2
)
}
}
let
s
=
{...
item
};
list
.
push
(
s
);
}
let
total
=
JSON
.
parse
(
JSON
.
stringify
(
datas
.
total
))
for
(
let
f
in
nf
){
if
(
total
[
f
]
&&
total
[
f
].
sampling_count
>
0
&&
total
[
f
].
qualified_count
>
0
){
total
[
f
]
=
((
total
[
f
].
qualified_count
/
total
[
f
].
sampling_count
)
*
100
).
toFixed
(
2
)
}
else
if
(
total
[
f
]
&&
total
[
f
].
sampling_count
==
0
||
total
[
f
].
qualified_count
==
0
){
total
[
f
]
=
0
}
}
for
(
let
f
in
this
.
field
){
if
(
total
[
f
]
&&
this
.
field
[
f
].
type
){
total
[
f
]
=
total
[
f
][
this
.
field
[
f
].
type
]
}
}
list
.
push
({...
total
,
'accepting_unit'
:
"总计"
})
return
{
type
:
'table'
,
chart_id
:
'tobacco_industry_all'
,
color
:
'#E6A23C'
,
title
:
'工业统计'
,
print_id
:
'tobacco_industry_all'
,
labers
,
list
,
};
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.centenr_container
{
width
:
calc
(
100%
-
20px
);
margin
:
0
auto
;
overflow-x
:
hidden
;
}
.row_container
{
margin-bottom
:
15px
;
}
</
style
>
src/views/business/display_board/index.vue
浏览文件 @
cfc8b2e0
<
template
>
<div
class=
"module_container"
>
<div
class=
"module_container_left"
>
11111
</div>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
>
<table-head
:head_data=
"head_data"
@
search=
"searchEvent"
@
resetting=
"resetting"
@
btnClick=
"btnClick"
></table-head>
<!--
<table-head
:head_data=
"head_data"
@
search=
"searchEvent"
@
resetting=
"resetting"
@
btnClick=
"btnClick"
></table-head>
-->
<el-row
:gutter=
"20"
>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.document_number"
placeholder=
"请输入文件编号"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.sampling_year"
placeholder=
"请输入抽检年份"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.sampling_time"
placeholder=
"请输入抽检时间"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.check_provinces"
placeholder=
"请输入检查省份"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.check_city"
placeholder=
"请输入检查地市"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.check_area"
placeholder=
"请输入检查地县"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.check_address"
placeholder=
"请输入检查地点名称"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.accepting_unit"
placeholder=
"请输入接收单位"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.tobacco_origin_provinces"
placeholder=
"请输入产烟省"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.tobacco_origin_city"
placeholder=
"请输入产烟地市"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.tobacco_origin_area"
placeholder=
"请输入产烟县"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"4"
><el-input
clearable
v-model=
"request_params.sampling_grade"
placeholder=
"请输入抽检等级"
@
keydown
.
enter
.
native=
"getTableData"
></el-input></el-col>
<el-col
style=
"padding-top:10px"
:span=
"12"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
v-loading=
'is_loading'
@
click=
"getTableData()"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-download"
v-loading=
'is_export_loading'
@
click=
"exportData()"
>
导出条件数据
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"deleteData()"
>
删除条件数据
</el-button>
</el-col>
<el-col
style=
"padding-top:10px;text-align:right"
:span=
"12"
>
<el-upload
style=
"float: right;"
action=
""
:show-file-list=
"false"
accept=
".xlsx"
:http-request=
"sliderRequest"
>
<el-button
v-loading=
'is_upload_loading'
type=
"primary"
icon=
"el-icon-upload2"
>
上传原始数据(Execl)
</el-button>
</el-upload>
<el-button
style=
"margin-right:20px ;"
type=
"primary"
@
click=
"goCount()"
icon=
"el-icon-data-analysis"
>
数据分析
</el-button>
</el-col>
</el-row>
<div
class=
"table_container"
>
<el-table
v-loading=
"is_loading"
:data=
"tableData"
style=
"width: 100%;margin-bottom: 20px;"
height=
"650"
>
<el-table-column
prop=
"name_zh"
label=
"中文名称"
>
<el-table
v-loading=
"is_loading"
:data=
"tableData"
style=
"width: 100%;margin-bottom: 20px;"
height=
"560"
>
<el-table-column
type=
"index"
width=
'50'
></el-table-column>
<el-table-column
prop=
"id"
label=
"ID"
></el-table-column>
<el-table-column
prop=
"num"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"sampling_year"
label=
"抽检年份"
></el-table-column>
<el-table-column
prop=
"check_provinces"
label=
"检查省份"
></el-table-column>
<el-table-column
prop=
"check_city"
label=
"检查地点(地市)"
></el-table-column>
<el-table-column
prop=
"check_area"
label=
"检查地点(县)"
></el-table-column>
<el-table-column
prop=
"check_address"
label=
"检查地点名称"
></el-table-column>
<el-table-column
prop=
"accepting_unit"
label=
"接收单位"
></el-table-column>
<el-table-column
prop=
"unit_category"
label=
"类别"
></el-table-column>
<el-table-column
prop=
"tobacco_mode"
label=
"模式"
></el-table-column>
<el-table-column
prop=
"tune_in"
label=
"收调"
></el-table-column>
<el-table-column
prop=
"tobacco_origin_provinces"
label=
"产烟省"
></el-table-column>
<el-table-column
prop=
"tobacco_origin_city"
label=
"产烟地市"
></el-table-column>
<el-table-column
prop=
"tobacco_origin_area"
label=
"产烟县"
></el-table-column>
<el-table-column
prop=
"sampling_time"
label=
"抽检时间"
></el-table-column>
<el-table-column
prop=
"sampling_grade"
label=
"抽检等级"
></el-table-column>
<el-table-column
prop=
"large_scale"
label=
"大等级"
></el-table-column>
<el-table-column
prop=
"position"
label=
"部位"
></el-table-column>
<el-table-column
prop=
"grade2"
label=
"色组"
></el-table-column>
<el-table-column
prop=
"grade"
label=
"质量档次"
></el-table-column>
<el-table-column
prop=
"sampling_radix_batch"
label=
"抽检基数批量(担)"
></el-table-column>
<el-table-column
prop=
"sampling_count"
label=
"抽检把数"
></el-table-column>
<el-table-column
prop=
"qualified_count"
label=
"合格把数"
></el-table-column>
<el-table-column
prop=
"qualification_rate"
label=
"合格率(%)"
></el-table-column>
<el-table-column
prop=
"number_mixed_levels"
label=
"混等级个数"
></el-table-column>
<el-table-column
prop=
"mixed_neighbor_level"
width=
'110'
label=
"混近邻等级"
>
<template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.mixed_neighbor_level"
:key=
"index"
:title=
'index+":"+i'
>
{{
index
}}
:
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"英文名称"
>
<el-table-column
prop=
"mixed_neighbor_level_number"
label=
"混近邻等级把数"
></el-table-column>
<el-table-column
prop=
"mixed_non_neighbor_level"
width=
'110'
label=
"混非近邻等级"
>
<
template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.mixed_non_neighbor_level"
:key=
"index"
:title=
'index+":"+i'
>
{{
index
}}
:
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"view_path"
label=
"组件地址"
>
<el-table-column
prop=
"mixed_non_neighbor_level_number"
label=
"混非近邻等级把数"
></el-table-column>
<el-table-column
prop=
"mixed_superior"
label=
"混上等"
></el-table-column>
<el-table-column
prop=
"mixed_medium"
label=
"混中等"
></el-table-column>
<el-table-column
prop=
"mixed_inferior"
label=
"混下等"
></el-table-column>
<el-table-column
prop=
"mixed_high"
label=
"混高"
></el-table-column>
<el-table-column
prop=
"mixed_low"
label=
"混低"
></el-table-column>
<el-table-column
prop=
"mixed_v"
label=
"混V"
></el-table-column>
<el-table-column
prop=
"mixed_k"
label=
"混K"
></el-table-column>
<el-table-column
prop=
"mixed_s"
label=
"混S"
></el-table-column>
<el-table-column
prop=
"mixed_gy"
label=
"混GY"
></el-table-column>
<el-table-column
prop=
"shui_chao"
label=
"水超"
></el-table-column>
<el-table-column
prop=
"pressure_oil"
label=
"压油"
></el-table-column>
<el-table-column
prop=
"mildew"
label=
"霉变"
></el-table-column>
<el-table-column
prop=
"out_class"
label=
"级外"
></el-table-column>
<el-table-column
prop=
"mixed_upper"
label=
"混上部"
></el-table-column>
<el-table-column
prop=
"mixed_central"
label=
"混中部"
></el-table-column>
<el-table-column
prop=
"mixed_lower_part"
label=
"混下部"
></el-table-column>
<el-table-column
prop=
"mixed_f"
label=
"混F"
></el-table-column>
<el-table-column
prop=
"mixed_l"
label=
"混L"
></el-table-column>
<el-table-column
prop=
"mixed_r"
label=
"混R"
></el-table-column>
<el-table-column
prop=
"mixed_group"
label=
"混组"
></el-table-column>
<el-table-column
prop=
"mixed_parts"
label=
"混部位"
></el-table-column>
<el-table-column
prop=
"chief_examiner"
width=
'120'
label=
"主检"
>
<
template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.chief_examiner"
:key=
"index"
:title=
'i'
>
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"path"
label=
"路由地址"
>
<el-table-column
prop=
"pre_screener"
width=
'120'
label=
"预检员"
>
<
template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.pre_screener"
:key=
"index"
:title=
'i'
>
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"team_leader"
width=
'120'
label=
"组长"
>
<
template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.team_leader"
:key=
"index"
:title=
'i'
>
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"sampler"
width=
'120'
label=
"抽样员"
>
<
template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.sampler"
:key=
"index"
:title=
'i'
>
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"recorder"
width=
'120'
label=
"记录员"
>
<
template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.recorder"
:key=
"index"
:title=
'i'
>
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"remark1"
label=
"备注1"
></el-table-column>
<el-table-column
prop=
"remark2"
label=
"备注2"
></el-table-column>
<el-table-column
label=
"操作"
width=
"120"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -24,65 +124,69 @@
</el-table-column>
</el-table>
</div>
<div
style=
"text-align: right"
>
<el-pagination
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"request_params.page"
:page-size=
"request_params.limit"
layout=
"total, prev, pager, next"
:total=
"request_params.total"
>
</el-pagination>
</div>
</el-card>
</div>
<el-dialog
title=
"提示"
:visible
.
sync=
"is_dialogVisible"
width=
"60%"
:before-close=
"handleClose"
>
<
!-- <
el-dialog title="提示" :visible.sync="is_dialogVisible" width="60%" :before-close="handleClose">
<div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="submitData">确 定</el-button>
</span>
</el-dialog>
</el-dialog>
-->
</div>
</template>
<
script
>
import
TableHead
from
'@/components/TableHead/index'
;
import
{
get_department_list
,
add_department
,
delete_department
,
edit_department
}
from
'@/api/system'
;
const
standard_template
=
{
id
:
null
,
father_id
:
-
1
,
//父级id
is_show
:
false
,
//是否展示为菜单
name
:
null
,
//英文名称
name_zh
:
null
,
//中文名称
path
:
null
,
//路由路径
sort
:
null
,
//排序
status
:
1
,
//状态
type
:
1
,
//类型:菜单/按钮
view_path
:
null
,
//视图路径
icon
:
null
,
//图标
// import { get_department_list, add_department, delete_department, edit_department } from '@/api/system';
import
{
industry_commerce_handover_upload
,
industry_commerce_handover_list
,
industry_commerce_handover_export
,
industry_commerce_handover_destroy
}
from
'@/api/business'
;
import
{
exportText
}
from
'@/utils/tool.js'
;
const
search_def_data
=
{
page
:
1
,
limit
:
10
,
total
:
1
,
document_number
:
''
,
//word时需要文件编号
sampling_year
:
''
,
//抽检年份
sampling_time
:
''
,
//抽检时间
check_provinces
:
''
,
//检查省份
check_city
:
''
,
//检查地点_地市
check_area
:
''
,
//检查地点_县
check_address
:
''
,
//检查地点名称
accepting_unit
:
''
,
//接收单位
tobacco_origin_provinces
:
''
,
//产烟省
tobacco_origin_city
:
''
,
//产烟地市
tobacco_origin_area
:
''
,
//产烟县
sampling_grade
:
''
,
//抽检等级
}
export
default
{
data
()
{
return
{
//头部按钮
head_data
:
{
is_search_show
:
true
,
// search_placeholder: "学员姓名/手机号",
right_buttons
:
[
{
text
:
'新增'
,
icon
:
'el-icon-document-add'
,
event
:
'add'
,
}
],
},
is_export_loading
:
false
,
is_upload_loading
:
false
,
IP
:
process
.
env
.
VUE_APP_BASE_API
,
//初始化请求参数
request_params
:
{
page
:
1
,
limit
:
10
,
total
:
1
,
},
request_params
:
Object
.
assign
({},
search_def_data
),
is_loading
:
false
,
tableData
:
[],
is_dialogVisible
:
false
,
is_updata_type
:
'add'
,
//
};
},
...
...
@@ -95,32 +199,81 @@ export default {
},
methods
:
{
searchEvent
(
val
)
{
console
.
log
(
'搜索'
);
console
.
log
(
val
);
goCount
(){
this
.
$router
.
push
({
path
:
'/business/display_board_count'
,
});
},
resetting
(
val
)
{
console
.
log
(
'重置'
);
console
.
log
(
val
);
// 上传execl表格数据
sliderRequest
(
upload
){
this
.
is_upload_loading
=
true
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
upload
.
file
);
industry_commerce_handover_upload
(
formData
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
getTableData
();
}
this
.
is_upload_loading
=
false
});
},
btnClick
(
val
)
{
console
.
log
(
'右侧按钮'
);
console
.
log
(
val
);
exportData
(){
this
.
is_export_loading
=
true
industry_commerce_handover_export
(
this
.
request_params
).
then
(
res
=>
{
if
(
res
.
message
){
let
str
=
res
.
message
.
split
(
'='
);
let
url
=
`
${
this
.
IP
}${
res
.
message
}
`
;
exportText
(
url
,
str
[
str
.
length
-
1
]);
}
this
.
is_export_loading
=
false
})
},
// 删除搜寻数据
deleteData
(){
this
.
$confirm
(
'是否删除搜索寻数据?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
industry_commerce_handover_destroy
(
this
.
request_params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
}
});
})
.
catch
(()
=>
{
init
()
{
});
},
//分页
handleCurrentChange
(
val
)
{
this
.
request_params
.
page
=
val
;
this
.
getTableData
();
},
getTableData
(){
this
.
is_loading
=
true
industry_commerce_handover_list
(
this
.
request_params
).
then
(
res
=>
{
this
.
tableData
=
res
.
data
;
this
.
request_params
.
page
=
res
.
current_page
this
.
request_params
.
total
=
res
.
total
this
.
request_params
.
limit
=
parseInt
(
res
.
per_page
)
this
.
is_loading
=
false
})
},
init
()
{
this
.
request_params
=
Object
.
assign
({},
search_def_data
);
this
.
getTableData
();
},
//取消
handleClose
()
{
this
.
is_dialogVisible
=
false
;
},
//提交
submitData
()
{
},
},
}
</
script
>
...
...
src/views/business/raw_data/details.vue
0 → 100644
浏览文件 @
cfc8b2e0
<
template
>
<div
class=
"module_container"
>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
>
<el-row
:gutter=
"20"
>
<el-col
style=
""
:span=
"10"
>
<el-button
type=
"text"
icon=
"el-icon-back"
@
click=
"goBack()"
>
返回
</el-button>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
style=
"padding-top:10px"
:span=
"11"
>
<div
class=
"img_box"
v-loading=
'is_upload_loading'
>
<el-upload
v-if=
"!sub_data.image_path"
action=
""
class=
"upload-demo"
:accept=
"'image/*'"
:show-file-list=
"false"
:http-request=
"sliderRequest"
>
<div
style=
"width:100%;height: 100%;"
>
<i
style=
"font-size:80px"
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
点击上传
<p>
只能上传jpg/png文件,且不超过20MB
</p>
</div>
</div>
</el-upload>
<div
v-else
class=
"upload-demo"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
circle
style=
"position: absolute; right:10px;top:10px"
@
click=
"sub_data.image_path=''"
></el-button>
<img
style=
"width: 100%; max-height:100%"
:src=
"IP+sub_data.image_path"
/>
</div>
</div>
</el-col>
<el-col
style=
"padding-top:10px"
:span=
"13"
class=
"from_table_z"
:key=
"isUpdateData"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
文件编号:
<el-input
style=
"width:150px"
clearable
v-model=
"sub_data.document_number"
placeholder=
"请输入文件编号"
></el-input></el-col>
<el-col
:span=
"12"
style=
"text-align:right"
>
<el-button
v-if=
'sub_data.status!=2'
style=
"margin-left:10px;margin-top:10px"
type=
"primary"
size=
"mini"
v-loading=
'is_save_loading'
@
click=
"saveTableData()"
>
暂存
</el-button>
<el-button
v-if=
'sub_data.status!=2'
style=
"margin-left:10px;margin-top:10px"
type=
"primary"
size=
"mini"
v-loading=
'is_save_loading'
@
click=
"saveTableData(true)"
>
存入统计库
</el-button>
<el-button
v-if=
'sub_data.id'
style=
"margin-left:10px;margin-top:10px"
type=
"danger"
size=
"mini"
@
click=
"deleteData(true)"
>
删除
</el-button>
</el-col>
<el-col
:span=
"14"
>
检查地点:
<el-select
style=
"width:70px"
@
change=
"get_province_list_fun(sub_data.check_provinces,'city')"
v-model=
"sub_data.check_provinces"
placeholder=
"省"
>
<el-option
v-for=
"item in province_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
style=
"width:70px"
@
change=
"get_province_list_fun(sub_data.check_city,'area')"
v-model=
"sub_data.check_city"
placeholder=
"市"
>
<el-option
v-for=
"item in city_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
style=
"width:70px"
v-model=
"sub_data.check_area"
placeholder=
"区"
>
<el-option
v-for=
"item in area_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input
style=
"width:97px"
@
blur=
"updatecheck_address()"
clearable
v-model=
"sub_data.check_address"
placeholder=
"检查地点"
></el-input>
</el-col>
<el-col
:span=
"10"
style=
"text-align:right"
>
<el-input
style=
"width:78px"
clearable
v-model=
"sub_data.sampling_year"
placeholder=
"年"
></el-input>
年
<el-input
style=
"width:60px"
clearable
v-model=
"sub_data.sampling_m"
placeholder=
"月"
></el-input>
月
<el-input
style=
"width:60px"
clearable
v-model=
"sub_data.sampling_d"
placeholder=
"日"
></el-input>
日
</el-col>
</el-row>
<el-row
class=
"row_table_z"
:gutter=
"0"
>
<el-col
class=
"z_row_border"
:span=
"6"
>
检验目的
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
烟叶等级合格率
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
检验依据
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
《烤烟》GB2635-92
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
被抽检单位
</el-col>
<el-col
class=
"z_row_border"
:span=
"18"
style=
"text-align:left"
><el-input
clearable
v-model=
"sub_data.accepting_unit"
placeholder=
"请输入被抽检单位"
></el-input></el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
抽检批次号
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'index-'+index"
>
{{
index
+
1
}}
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
烟叶产地
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'tobacco_origin_area-'+index"
>
<el-input
style=
"width:60px"
clearable
v-model=
"i.tobacco_origin_area"
placeholder=
"烟叶产地"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
批或货物号码
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'num-'+index"
>
<el-input
style=
"width:60px"
clearable
v-model=
"i.num"
placeholder=
"批或货物号码"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
检查基数(担)
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'sampling_radix_batch-'+index"
>
<el-input
style=
"width:60px"
type=
'number'
clearable
v-model=
"i.sampling_radix_batch"
placeholder=
"检查基数(担)"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
style=
"height:28px"
>
抽检等级
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'sampling_grade-'+index"
>
<el-button
@
click=
"sampling_grade_show(i.sampling_grade,index)"
type=
'text'
size=
"mini"
>
{{
i
.
sampling_grade
||
'暂无'
}}
</el-button>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
抽检把数
</el-col>
<el-col
class=
"z_row_border"
:span=
"18"
>
暂无
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
合格把数
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'qualified_count-'+index"
>
<el-input
style=
"width:60px"
type=
'number'
clearable
v-model=
"i.qualified_count"
placeholder=
"合格把数"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
合格率(%)
</el-col>
<el-col
class=
"z_row_border"
:span=
"18"
>
暂无
</el-col>
<el-col
v-if=
"itemData[0] && itemData[0].mixed_neighbor_level"
class=
"z_row_border"
:span=
"6"
:style=
"
{height:(itemData[0].mixed_neighbor_level.length*28)+'px',paddingTop:(itemData[0].mixed_neighbor_level.length*28/2-28)+'px'}" >
混近邻等级把数
<p>
<el-button
style=
"margin-left:10px;margin-top:10px"
type=
"text"
size=
"mini"
@
click=
"mixed_level_data_set('mixed_neighbor_level','add')"
>
加一行
</el-button>
<el-button
style=
"margin-left:10px;margin-top:10px;color:red"
type=
"text"
size=
"mini"
@
click=
"mixed_level_data_set('mixed_neighbor_level','del')"
>
删除最后一行
</el-button>
</p>
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(item,index) in itemData"
:span=
"3"
:key=
"'mixed_neighbor_level-'+index"
>
<div
v-for=
"(ii,ind) in item.mixed_neighbor_level"
:key=
"'mixed_neighbor_level-'+index+'-'+ind"
>
<el-button
@
click=
"updateItem(index,ind,'mixed_neighbor_level')"
type=
'text'
size=
"mini"
>
{{
ii
||
'暂无'
}}
</el-button>
</div>
</el-col>
<el-col
class=
"z_row_border"
v-if=
"itemData[0] && itemData[0].mixed_non_neighbor_level"
:span=
"6"
:style=
"
{height:(itemData[0].mixed_non_neighbor_level.length*28)+'px',paddingTop:(itemData[0].mixed_non_neighbor_level.length*28/2-10)+'px'}" >
混非近邻等级把数
<p>
<el-button
style=
"margin-left:10px;margin-top:10px"
type=
"text"
size=
"mini"
@
click=
"mixed_level_data_set('mixed_non_neighbor_level','add')"
>
加一行
</el-button>
<el-button
style=
"margin-left:10px;margin-top:10px;color:red"
type=
"text"
size=
"mini"
@
click=
"mixed_level_data_set('mixed_non_neighbor_level','del')"
>
删除最后一行
</el-button>
</p>
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(item,index) in itemData"
:span=
"3"
:key=
"'mixed_non_neighbor_level-'+index"
>
<div
v-for=
"(ii,ind) in item.mixed_non_neighbor_level"
:key=
"'mixed_non_neighbor_level-'+index+ind"
>
<el-button
@
click=
"updateItem(index,ind,'mixed_non_neighbor_level')"
type=
'text'
size=
"mini"
>
{{
ii
||
'暂无'
}}
</el-button>
</div>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
压油
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'pressure_oil-'+index"
>
<el-input
style=
"width:60px"
type=
'number'
clearable
v-model=
"i.pressure_oil"
placeholder=
"压油"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
霉变
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'mildew-'+index"
>
<el-input
style=
"width:60px"
type=
'number'
clearable
v-model=
"i.mildew"
placeholder=
"霉变"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
水超
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'shui_chao-'+index"
>
<el-input
style=
"width:60px"
type=
'number'
clearable
v-model=
"i.shui_chao"
placeholder=
"水超"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
级外
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'out_class-'+index"
>
<el-input
style=
"width:60px"
type=
'number'
clearable
v-model=
"i.out_class"
placeholder=
"级外"
></el-input>
</el-col>
<el-col
class=
"z_row_border"
style=
"height:28px"
:span=
"6"
>
抽检地址
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'check_address-'+index"
>
<el-button
style=
"width:100% ;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
@
click=
"updatecheck_address_show(index)"
type=
'text'
size=
"mini"
:title=
'`$
{i.check_provinces}-${i.check_city}-${i.check_area}(${i.check_address})`'>
{{
i
.
check_address
||
'暂无'
}}
</el-button>
</el-col>
<el-col
class=
"z_row_border"
:span=
"6"
>
备注
</el-col>
<el-col
class=
"z_row_border"
v-for=
"(i,index) in itemData"
:span=
"3"
:key=
"'remark1-'+index"
>
<el-input
style=
"width:60px"
clearable
v-model=
"i.remark1"
placeholder=
"备注"
></el-input>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"8"
>
主检人:
<el-input
style=
"width:138px"
clearable
v-model=
"sub_data.chief_examiner"
placeholder=
"请输入主检人"
></el-input></el-col>
<el-col
:span=
"8"
>
预检员:
<el-input
style=
"width:138px"
clearable
v-model=
"sub_data.pre_screener"
placeholder=
"请输入预检员"
></el-input></el-col>
<el-col
:span=
"8"
>
组长:
<el-input
style=
"width:138px"
clearable
v-model=
"sub_data.team_leader"
placeholder=
"请输入组长"
></el-input></el-col>
<el-col
:span=
"8"
>
抽样员:
<el-input
style=
"width:138px"
clearable
v-model=
"sub_data.sampler"
placeholder=
"请输入抽样员"
></el-input></el-col>
<el-col
:span=
"8"
>
记录员:
<el-input
style=
"width:138px"
clearable
v-model=
"sub_data.recorder"
placeholder=
"请输入记录员"
></el-input></el-col>
<el-col
:span=
"8"
>
<el-button
v-if=
'sub_data.status!=2'
style=
"margin-left:10px;margin-top:10px"
type=
"primary"
size=
"mini"
v-loading=
'is_save_loading'
@
click=
"saveTableData()"
>
暂存
</el-button>
<el-button
v-if=
'sub_data.status!=2'
style=
"margin-left:10px;margin-top:10px"
type=
"primary"
size=
"mini"
v-loading=
'is_save_loading'
@
click=
"saveTableData(true)"
>
存入统计库
</el-button>
</el-col>
</el-row>
</el-col>
</el-row>
</el-card>
</div>
<el-dialog
title=
"等级选择与把数纠正"
:visible
.
sync=
"is_dialogVisible"
width=
"60%"
:before-close=
"handleClose"
>
<p>
<span>
当前等级:
</span><el-tag>
{{
item
.
grade
||
'暂无'
}}
</el-tag>
<span
style=
"padding-left:20px"
>
把数:
</span><el-input
type=
'number'
style=
"width:300px"
clearable
v-model=
"item.num"
placeholder=
"等级把数"
></el-input>
</p>
<div
style=
" max-height: 550px; width:450px;margin: 0 auto;"
>
<el-row>
<el-col
:span=
"8"
v-for=
"( tobacco_grades_data_f, tobacco_grades_data_index ) in tobacco_grades_data"
:key=
"'t' + tobacco_grades_data_index"
style=
"padding: 8px 0px"
>
<div
style=
"padding: 2px 0px"
>
<el-tag>
{{
tobacco_grades_data_f
.
name
}}
组
</el-tag>
</div>
<el-radio-group
size=
"mini"
v-model=
"item.grade"
>
<el-radio-button
v-for=
"( grade_code_i, grade_code_index ) in tobacco_grades_data_f.value"
:key=
" 's' + tobacco_grades_data_index + grade_code_index "
:label=
"grade_code_i.grade_code"
>
{{
grade_code_i
.
grade_code
}}
</el-radio-button
>
</el-radio-group>
</el-col>
</el-row>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleData"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"抽检等级"
:visible
.
sync=
"item_sampling_grade.is_dialogsampling_grade"
width=
"60%"
>
<p>
<span>
当前等级:
</span><el-tag>
{{
item_sampling_grade
.
sampling_grade
||
'暂无'
}}
</el-tag>
</p>
<div
style=
" max-height: 550px; width:450px;margin: 0 auto;"
>
<el-row>
<el-col
:span=
"8"
v-for=
"( tobacco_grades_data_f, tobacco_grades_data_index ) in tobacco_grades_data"
:key=
"'t' + tobacco_grades_data_index"
style=
"padding: 8px 0px"
>
<div
style=
"padding: 2px 0px"
>
<el-tag>
{{
tobacco_grades_data_f
.
name
}}
组
</el-tag>
</div>
<el-radio-group
size=
"mini"
v-model=
"item_sampling_grade.sampling_grade"
>
<el-radio-button
v-for=
"( grade_code_i, grade_code_index ) in tobacco_grades_data_f.value"
:key=
" 's' + tobacco_grades_data_index + grade_code_index "
:label=
"grade_code_i.grade_code"
>
{{
grade_code_i
.
grade_code
}}
</el-radio-button
>
</el-radio-group>
</el-col>
</el-row>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"item_sampling_grade.is_dialogsampling_grade=false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sampling_grade_set"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"抽检地址"
:visible
.
sync=
"item_address.is_dialogsampling_grade"
width=
"60%"
>
<div
style=
" max-height: 550px; width:450px;margin: 0 auto;"
>
<el-select
filterable
style=
"width:100%;padding-top:20px;"
@
change=
"get_address_fun(item_address.check_provinces,'city')"
v-model=
"item_address.check_provinces"
placeholder=
"省"
>
<el-option
v-for=
"item in province_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
filterable
style=
"width:100%;padding-top:20px;"
@
change=
"get_address_fun(item_address.check_city,'area')"
v-model=
"item_address.check_city"
placeholder=
"市"
>
<el-option
v-for=
"item in city_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
filterable
style=
"width:100%;padding-top:20px;"
v-model=
"item_address.check_area"
placeholder=
"区"
>
<el-option
v-for=
"item in area_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input
style=
"width:100%;padding-top:20px;"
clearable
v-model=
"item_address.check_address"
placeholder=
"检查地点"
></el-input>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"item_address.is_dialogsampling_grade=false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"address_set"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
getTobaccoList
,
ich_raw_data_imageUpload
,
ich_raw_data_save
,
ich_raw_data_get
,
ich_raw_data_delete
,
}
from
'@/api/business'
;
import
{
get_province_list
}
from
'@/api/student'
;
import
{
exportText
}
from
'@/utils/tool.js'
;
const
defaultData
=
{
document_number
:
""
,
// 文件编号
sampling_year
:
""
,
// 抽检年份
sampling_m
:
""
,
// 抽检月份
sampling_d
:
""
,
// 抽检天
chief_examiner
:
""
,
//主检人
pre_screener
:
""
,
//预检员
team_leader
:
""
,
//组长
sampler
:
""
,
//抽样员
recorder
:
""
,
//记录员
check_address
:
""
,
// 抽检地址
check_provinces
:
""
,
check_city
:
""
,
check_area
:
""
,
accepting_unit
:
""
,
//被抽检单位
image_path
:
""
,
//图片数据
}
const
defaultItemData
=
{
id
:
null
,
num
:
null
,
// 批或货物号码
check_provinces
:
""
,
check_city
:
""
,
check_area
:
""
,
check_address
:
""
,
// 抽检地址
accepting_unit
:
""
,
//被抽检单位
unit_category
:
""
,
// 类别
tobacco_mode
:
""
,
//模式
tune_in
:
""
,
//原收原调
tobacco_origin_provinces
:
""
,
tobacco_origin_city
:
""
,
tobacco_origin_area
:
""
,
//烟产地
sampling_grade
:
""
,
// 抽检等级
sampling_radix_batch
:
""
,
//检查基数(担)
qualified_count
:
""
,
//合格把数
mixed_neighbor_level
:[
//混近邻等级把数
''
,
''
,
''
,
''
,
''
,
],
mixed_non_neighbor_level
:[
//混非近邻等级把数
''
,
''
,
''
,
''
,
''
,
],
shui_chao
:
""
,
//水超
pressure_oil
:
""
,
//压油
mildew
:
""
,
//霉变
out_class
:
null
,
//级外
remark1
:
""
,
//备注
remark2
:
""
}
const
defaultItem
=
{
index
:
null
,
ind
:
null
,
type
:
''
,
num
:
null
,
grade
:
''
}
const
defaultsampling_grade
=
{
sampling_grade
:
''
,
index
:
null
,
is_dialogsampling_grade
:
false
}
const
defaultaddress
=
{
index
:
null
,
check_provinces
:
""
,
check_city
:
""
,
check_area
:
""
,
check_address
:
""
,
// 抽检地址
is_dialogsampling_grade
:
false
}
export
default
{
data
()
{
return
{
is_upload_loading
:
false
,
is_save_loading
:
false
,
IP
:
process
.
env
.
VUE_APP_BASE_API
,
sub_data
:
Object
.
assign
({},
defaultData
),
itemData
:
[],
is_loading
:
false
,
formData
:{
id
:
1
,
document_number
:
''
},
item
:
Object
.
assign
({},
defaultItem
),
isUpdateData
:
false
,
is_dialogVisible
:
false
,
tobacco_grades_data
:
[],
item_sampling_grade
:
Object
.
assign
({},
defaultsampling_grade
),
item_address
:
Object
.
assign
({},
defaultaddress
),
city_data
:[],
area_data
:[],
province_data
:[],
};
},
components
:
{
},
computed
:
{},
mounted
()
{
this
.
init
()
if
(
this
.
$route
.
query
.
document_number
){
this
.
formData
.
document_number
=
this
.
$route
.
query
.
document_number
this
.
getTableData
()
}
},
methods
:
{
goBack
()
{
this
.
$router
.
push
({
path
:
'/business/raw_data'
,
query
:
{
},
});
},
// 删除搜寻数据
deleteData
(){
this
.
$confirm
(
'是否删除搜索寻数据?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
ich_raw_data_delete
({
document_number
:
this
.
sub_data
.
document_number
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
}
});
}).
catch
(()
=>
{
});
},
updatecheck_address_show
(
index
){
this
.
item_address
=
{
index
:
index
,
check_provinces
:
this
.
itemData
[
index
].
check_provinces
,
check_city
:
this
.
itemData
[
index
].
check_city
,
check_area
:
this
.
itemData
[
index
].
check_area
,
check_address
:
this
.
itemData
[
index
].
check_address
,
is_dialogsampling_grade
:
true
}
},
address_set
(){
this
.
itemData
[
this
.
item_address
.
index
].
check_provinces
=
this
.
item_address
.
check_provinces
this
.
itemData
[
this
.
item_address
.
index
].
check_city
=
this
.
item_address
.
check_city
this
.
itemData
[
this
.
item_address
.
index
].
check_area
=
this
.
item_address
.
check_area
this
.
itemData
[
this
.
item_address
.
index
].
check_address
=
this
.
item_address
.
check_address
this
.
item_address
=
Object
.
assign
({},
defaultaddress
);
},
updatecheck_address
(){
let
dd
=
[];
for
(
let
i
in
this
.
itemData
){
if
(
dd
.
indexOf
(
this
.
itemData
[
i
].
check_address
)
<
0
){
dd
.
push
(
this
.
itemData
[
i
].
check_address
)
}
}
if
(
this
.
sub_data
.
check_address
){
for
(
let
i
in
this
.
itemData
){
if
(
!
this
.
itemData
[
i
].
check_address
||
dd
.
length
==
1
){
this
.
itemData
[
i
].
check_provinces
=
this
.
sub_data
.
check_provinces
this
.
itemData
[
i
].
check_city
=
this
.
sub_data
.
check_city
this
.
itemData
[
i
].
check_area
=
this
.
sub_data
.
check_area
this
.
itemData
[
i
].
check_address
=
this
.
sub_data
.
check_address
}
}
}
},
mixed_level_data_set
(
type
,
add_or_del
){
if
(
add_or_del
==
'add'
){
for
(
let
i
in
this
.
itemData
){
this
.
itemData
[
i
][
type
].
push
(
''
)
}
}
else
{
for
(
let
i
in
this
.
itemData
){
if
(
this
.
itemData
[
i
][
type
].
length
<=
5
){
this
.
$message
.
error
(
'当前数据无法删除,数据最少五行'
);
return
;
}
this
.
itemData
[
i
][
type
].
pop
()
}
}
this
.
isUpdateData
=!
this
.
isUpdateData
},
sampling_grade_set
(){
this
.
itemData
[
this
.
item_sampling_grade
.
index
].
sampling_grade
=
this
.
item_sampling_grade
.
sampling_grade
this
.
item_sampling_grade
=
Object
.
assign
({},
defaultsampling_grade
);
},
//抽检等级显示数据处理
sampling_grade_show
(
g
,
i
){
this
.
item_sampling_grade
=
{
sampling_grade
:
g
,
index
:
i
,
is_dialogsampling_grade
:
true
}
},
//显示混近邻等级和非近邻等级的是数据处理和显示
updateItem
(
index
,
ind
,
type
){
let
item
=
this
.
itemData
[
index
][
type
][
ind
]
if
(
item
){
let
s
=
item
.
split
(
' '
)
if
(
s
.
length
==
2
){
this
.
item
.
grade
=
s
[
0
]
this
.
item
.
num
=
s
[
1
]
}
}
this
.
item
.
index
=
index
;
this
.
item
.
ind
=
ind
;
this
.
item
.
type
=
type
;
this
.
is_dialogVisible
=
true
;
},
handleClose
(){
this
.
item
=
Object
.
assign
({},
defaultItem
)
this
.
is_dialogVisible
=
false
;
this
.
isUpdateData
=!
this
.
isUpdateData
},
handleData
(){
if
(
this
.
item
.
grade
&&
this
.
item
.
num
){
this
.
itemData
[
this
.
item
.
index
][
this
.
item
.
type
][
this
.
item
.
ind
]
=
this
.
item
.
grade
+
' '
+
this
.
item
.
num
}
this
.
item
=
Object
.
assign
({},
defaultItem
)
this
.
is_dialogVisible
=
false
;
this
.
isUpdateData
=!
this
.
isUpdateData
},
sliderRequest
(
upload
){
this
.
is_upload_loading
=
true
const
formData
=
new
FormData
();
formData
.
append
(
'image'
,
upload
.
file
);
ich_raw_data_imageUpload
(
formData
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
&&
res
.
message
&&
res
.
message
.
rowdata
&&
res
.
message
.
data
)
{
this
.
sub_data
.
image_path
=
res
.
message
.
rowdata
.
image_path
//图片数据
this
.
sub_data
.
sampling_year
=
res
.
message
.
rowdata
.
sampling_year
||
this
.
sub_data
.
sampling_year
this
.
sub_data
.
sampling_m
=
res
.
message
.
rowdata
.
sampling_m
||
this
.
sub_data
.
sampling_m
this
.
sub_data
.
sampling_d
=
res
.
message
.
rowdata
.
sampling_d
||
this
.
sub_data
.
sampling_d
this
.
itemData
=
[]
for
(
let
i
=
0
;
i
<
res
.
message
.
data
.
length
;
i
++
){
this
.
itemData
.
push
({
id
:
null
,
num
:
null
,
// 批或货物号码
check_provinces
:
this
.
sub_data
.
check_provinces
,
check_city
:
this
.
sub_data
.
check_city
,
check_area
:
this
.
sub_data
.
check_area
,
check_address
:
this
.
sub_data
.
check_address
,
// 抽检地址
accepting_unit
:
this
.
sub_data
.
accepting_unit
,
// 抽检地址
unit_category
:
""
,
// 类别
tobacco_mode
:
""
,
//模式
tune_in
:
""
,
//原收原调
tobacco_origin_provinces
:
""
,
tobacco_origin_city
:
""
,
tobacco_origin_area
:
""
,
//烟产地
sampling_grade
:
res
.
message
.
data
[
i
].
sampling_grade
,
// 抽检等级
sampling_radix_batch
:
res
.
message
.
data
[
i
].
sampling_radix_batch
,
//检查基数(担)
qualified_count
:
res
.
message
.
data
[
i
].
qualified_count
,
//合格把数
mixed_neighbor_level
:
res
.
message
.
data
[
i
].
mixed_neighbor_level
,
mixed_non_neighbor_level
:
res
.
message
.
data
[
i
].
mixed_non_neighbor_level
,
shui_chao
:
res
.
message
.
data
[
i
].
shui_chao
,
//水超
pressure_oil
:
res
.
message
.
data
[
i
].
pressure_oil
,
//压油
mildew
:
res
.
message
.
data
[
i
].
mildew
,
//霉变
out_class
:
res
.
message
.
data
[
i
].
out_class
,
//级外
remark1
:
""
,
remark2
:
""
});
}
this
.
$message
.
success
(
'上传成功'
);
}
this
.
is_upload_loading
=
false
});
},
getTobaccoInfo
()
{
getTobaccoList
().
then
((
res
)
=>
{
this
.
tobacco_grades_data
=
res
;
});
},
saveTableData
(
is_to_database
){
this
.
is_save_loading
=
true
ich_raw_data_save
({
rowdata
:
this
.
sub_data
,
data
:
this
.
itemData
,
is_to_database
:
is_to_database
}).
then
(
res
=>
{
if
(
res
.
rowdata
){
this
.
sub_data
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
rowdata
))
}
if
(
res
.
data
){
this
.
itemData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
}
if
(
res
.
code
==
200
){
this
.
sub_data
.
id
=
null
// 文件编号
this
.
sub_data
.
document_number
=
""
// 文件编号
this
.
sub_data
.
image_path
=
""
//图片数据
this
.
itemData
=
[]
for
(
let
i
=
1
;
i
<=
6
;
i
++
){
this
.
itemData
.
push
({
id
:
null
,
num
:
null
,
// 批或货物号码
check_provinces
:
this
.
sub_data
.
check_provinces
,
check_city
:
this
.
sub_data
.
check_city
,
check_area
:
this
.
sub_data
.
check_area
,
check_address
:
this
.
sub_data
.
check_address
,
// 抽检地址
accepting_unit
:
this
.
sub_data
.
accepting_unit
,
// 抽检地址
unit_category
:
""
,
// 类别
tobacco_mode
:
""
,
//模式
tune_in
:
""
,
//原收原调
tobacco_origin_provinces
:
""
,
tobacco_origin_city
:
""
,
tobacco_origin_area
:
""
,
//烟产地
sampling_grade
:
""
,
// 抽检等级
sampling_radix_batch
:
""
,
//检查基数(担)
qualified_count
:
""
,
//合格把数
mixed_neighbor_level
:[
//混近邻等级把数
''
,
''
,
''
,
''
,
''
,
],
mixed_non_neighbor_level
:[
//混非近邻等级把数
''
,
''
,
''
,
''
,
''
,
],
shui_chao
:
""
,
//水超
pressure_oil
:
""
,
//压油
mildew
:
""
,
//霉变
out_class
:
null
,
//级外
remark1
:
""
,
remark2
:
""
});
}
}
this
.
is_save_loading
=
false
})
},
getTableData
(){
this
.
is_loading
=
true
ich_raw_data_get
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
rowdata
){
this
.
sub_data
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
rowdata
))
}
if
(
res
.
data
){
this
.
itemData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
}
this
.
is_loading
=
false
})
},
get_province_list_fun
(
name
=
null
,
type
=
'province'
){
if
(
type
==
'province'
){
this
.
province_data
=
[]
this
.
city_data
=
[]
this
.
area_data
=
[]
}
else
if
(
type
==
'city'
){
this
.
city_data
=
[]
this
.
area_data
=
[]
this
.
sub_data
.
check_city
=
''
;
this
.
sub_data
.
check_area
=
''
;
}
else
if
(
type
==
'area'
){
this
.
area_data
=
[]
this
.
sub_data
.
check_area
=
''
;
}
this
.
fun_get_province_list
(
name
,
type
)
},
get_address_fun
(
name
=
null
,
type
=
'province'
){
if
(
type
==
'province'
){
this
.
province_data
=
[]
this
.
city_data
=
[]
this
.
area_data
=
[]
}
else
if
(
type
==
'city'
){
this
.
city_data
=
[]
this
.
area_data
=
[]
this
.
item_address
.
check_city
=
''
;
this
.
item_address
.
check_area
=
''
;
}
else
if
(
type
==
'area'
){
this
.
area_data
=
[]
this
.
item_address
.
check_area
=
''
;
}
this
.
fun_get_province_list
(
name
,
type
)
},
fun_get_province_list
(
name
=
null
,
type
=
'province'
){
get_province_list
({
type
:
type
,
name
:
name
,
name_is_value
:
true
}).
then
((
res
)
=>
{
this
[
type
+
'_data'
]
=
res
;
});
},
init
()
{
this
.
getTobaccoInfo
()
this
.
get_province_list_fun
()
this
.
itemData
=
[];
for
(
let
i
=
1
;
i
<=
6
;
i
++
){
this
.
itemData
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
Object
.
assign
({},
defaultItemData
))));
}
this
.
sub_data
=
Object
.
assign
({},
defaultData
)
},
},
}
</
script
>
<
style
lang=
"scss"
>
.img_box
{
width
:
500px
;
height
:
780px
;
text-align
:
center
;
border
:
1px
solid
#b0b0b0
;
border-radius
:
8px
;
.upload-demo
{
width
:
100%
;
height
:
100%
;
position
:
relative
;
}
.el-upload
{
padding-top
:
180px
!
important
;
width
:
100%
!
important
;
height
:
100%
!
important
;
}
}
.from_table_z
{
font-size
:
12px
;
.el-input__inner
{
border-radius
:
0px
;
border-top-width
:
0px
;
border-left-width
:
0px
;
border-right-width
:
0px
;
border-bottom-width
:
1px
;
}
.row_table_z
{
margin-top
:
10px
;
border-right
:
1px
solid
#b0b0b0
;
border-bottom
:
1px
solid
#b0b0b0
;
text-align
:
center
;
.z_row_border
{
line-height
:
22px
;
border-top
:
1px
solid
#b0b0b0
;
border-left
:
1px
solid
#b0b0b0
;
}
.el-input__inner
{
border-radius
:
0px
;
border-top-width
:
0px
;
border-left-width
:
0px
;
border-right-width
:
0px
;
border-bottom-width
:
0px
;
padding
:
0px
;
height
:
20px
;
line-height
:
20px
;
}
}
}
</
style
>
\ No newline at end of file
src/views/business/raw_data/index.vue
浏览文件 @
cfc8b2e0
<!-- -->
<
template
>
<div>
原始数据
</div>
<div
class=
"module_container"
>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
>
<el-row
:gutter=
"20"
>
<el-col
style=
"padding-top:10px"
:span=
"12"
>
<span
style=
"display: inline-block; width:calc(100% - 110px);"
>
<el-input
clearable
v-model=
"request_params.document_number"
placeholder=
"请输入文件编号"
@
keydown
.
enter
.
native=
"getTableData"
></el-input>
</span>
<el-button
style=
"margin-left:10px"
type=
"primary"
icon=
"el-icon-search"
v-loading=
'is_loading'
@
click=
"getTableData()"
>
查询
</el-button>
</el-col>
<el-col
:span=
"12"
style=
"text-align:right"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toDetail()"
>
新增
</el-button>
</el-col>
</el-row>
<div
class=
"table_container"
>
<el-table
v-loading=
"is_loading"
:data=
"tableData"
style=
"width: 100%;margin-bottom: 20px;"
height=
"560"
>
<el-table-column
type=
"index"
width=
'50'
></el-table-column>
<el-table-column
prop=
"id"
label=
"ID"
></el-table-column>
<el-table-column
prop=
"document_number"
label=
"文件编号"
></el-table-column>
<el-table-column
prop=
"sampling_year"
label=
"抽检年份"
></el-table-column>
<el-table-column
prop=
"check_provinces"
label=
"检查省份"
></el-table-column>
<el-table-column
prop=
"check_city"
label=
"检查地点(地市)"
></el-table-column>
<el-table-column
prop=
"check_area"
label=
"检查地点(县)"
></el-table-column>
<el-table-column
prop=
"check_address"
label=
"检查地点名称"
></el-table-column>
<el-table-column
prop=
"accepting_unit"
label=
"接收单位"
></el-table-column>
<el-table-column
prop=
"chief_examiner"
width=
'120'
label=
"主检"
></el-table-column>
<el-table-column
prop=
"pre_screener"
width=
'120'
label=
"预检员"
></el-table-column>
<el-table-column
prop=
"team_leader"
width=
'120'
label=
"组长"
></el-table-column>
<el-table-column
prop=
"sampler"
width=
'120'
label=
"抽样员"
></el-table-column>
<el-table-column
prop=
"recorder"
width=
'120'
label=
"记录员"
></el-table-column>
<el-table-column
label=
"操作"
width=
"240"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"toDetail(scope.row)"
>
详情/编辑
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"deleteData(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<div
style=
"text-align: right"
>
<el-pagination
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"request_params.page"
:page-size=
"request_params.limit"
layout=
"total, prev, pager, next"
:total=
"request_params.total"
>
</el-pagination>
</div>
</el-card>
</div>
</div>
</template>
<
script
>
import
{
ich_raw_data_delete
,
ich_raw_data_list
}
from
'@/api/business'
;
import
{
get_province_list
}
from
'@/api/student'
;
import
{
exportText
}
from
'@/utils/tool.js'
;
const
search_def_data
=
{
page
:
1
,
limit
:
10
,
total
:
1
,
document_number
:
''
,
//word时需要文件编号
}
export
default
{
data
()
{
data
()
{
return
{
request_params
:
Object
.
assign
({},
search_def_data
),
is_loading
:
false
,
tableData
:
[],
};
},
components
:
{},
components
:
{
},
computed
:
{},
mounted
(){},
mounted
()
{
this
.
init
()
},
methods
:
{
getTableData
(){
this
.
is_loading
=
true
ich_raw_data_list
(
this
.
formData
).
then
(
res
=>
{
this
.
tableData
=
res
.
data
;
this
.
request_params
.
page
=
res
.
current_page
this
.
request_params
.
total
=
res
.
total
this
.
request_params
.
limit
=
parseInt
(
res
.
per_page
)
this
.
is_loading
=
false
})
},
//分页
handleCurrentChange
(
val
)
{
this
.
request_params
.
page
=
val
;
this
.
getTableData
();
},
// 删除搜寻数据
deleteData
(
item
){
this
.
$confirm
(
'是否删除搜索寻数据?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
ich_raw_data_delete
({
document_number
:
item
.
document_number
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
}
});
}).
catch
(()
=>
{
methods
:
{}
});
},
toDetail
(
item
)
{
let
document_number
=
item
?
item
.
document_number
:
null
;
this
.
$router
.
push
({
path
:
'/business/raw_data_details'
,
query
:
{
document_number
:
document_number
,
},
});
},
init
()
{
this
.
getTableData
()
},
},
}
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
>
.img_box
{
width
:
500px
;
height
:
780px
;
text-align
:
center
;
border
:
1px
solid
#b0b0b0
;
border-radius
:
8px
;
.upload-demo
{
width
:
100%
;
height
:
100%
;
position
:
relative
;
}
.el-upload
{
padding-top
:
180px
!
important
;
width
:
100%
!
important
;
height
:
100%
!
important
;
}
}
.from_table_z
{
font-size
:
12px
;
.el-input__inner
{
border-radius
:
0px
;
border-top-width
:
0px
;
border-left-width
:
0px
;
border-right-width
:
0px
;
border-bottom-width
:
1px
;
}
.row_table_z
{
margin-top
:
10px
;
border-right
:
1px
solid
#b0b0b0
;
border-bottom
:
1px
solid
#b0b0b0
;
text-align
:
center
;
.z_row_border
{
line-height
:
22px
;
border-top
:
1px
solid
#b0b0b0
;
border-left
:
1px
solid
#b0b0b0
;
}
.el-input__inner
{
border-radius
:
0px
;
border-top-width
:
0px
;
border-left-width
:
0px
;
border-right-width
:
0px
;
border-bottom-width
:
0px
;
padding
:
0px
;
height
:
20px
;
line-height
:
20px
;
}
}
}
</
style
>
src/views/business/road/components/dialog.vue
0 → 100644
浏览文件 @
cfc8b2e0
<!--
* @Author: czj
* @Date: 2023-03-07 14:41:33
* @Description:
* @FilePath: \AdministrationHome\src\views\student\tobacco_grades\components\dialog.vue
-->
<!-- -->
<
template
>
<div>
<div
style=
"max-height:700px;overflow-y: auto;"
>
<el-form
label-width=
"150px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"公司名称"
>
<el-input
v-model=
"data_item.name"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"公司别名"
>
<div
v-if=
"data_item.company_alias && data_item.company_alias.length"
>
<div
v-for=
"(item, index) in data_item.company_alias"
:key=
"index"
class=
"input_box"
>
<el-input
v-model=
"data_item.company_alias[index]"
style=
"width: calc(100% - 100px);"
></el-input>
<el-button
v-if=
"index == data_item.company_alias.length - 1"
type=
"text"
icon=
"el-icon-circle-plus-outline"
title=
"添加"
@
click=
"addData()"
></el-button>
<el-button
class=
"delete_breed"
type=
"text"
icon=
"el-icon-delete"
title=
"删除"
@
click=
"deleteDate(index, 'appearance')"
></el-button>
</div>
</div>
<el-button
v-else
type=
"text"
icon=
"el-icon-circle-plus-outline"
title=
"添加"
@
click=
"addData()"
></el-button>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"公司类别"
>
<el-radio
v-model=
"data_item.unit_category"
label=
"备货"
>
备货
</el-radio>
<el-radio
v-model=
"data_item.unit_category"
label=
"交接"
>
交接
</el-radio>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"公司地址"
>
<el-select
style=
"width:80px"
@
change=
"get_province_list_fun(data_item.provinces,'city')"
v-model=
"data_item.provinces"
placeholder=
"省"
>
<el-option
v-for=
"item in province_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
style=
"padding-left:10px;width:90px"
@
change=
"get_province_list_fun(data_item.city,'area')"
v-model=
"data_item.city"
placeholder=
"市"
>
<el-option
v-for=
"item in city_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
style=
"padding-left:10px;width:90px"
v-model=
"data_item.area"
placeholder=
"区"
>
<el-option
v-for=
"item in area_data"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"详细地址"
>
<el-input
v-model=
"data_item.address"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"公司介绍"
>
<el-input
v-model=
"data_item.intro"
type=
"textarea"
:rows=
"2"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"data_item.remark"
type=
"textarea"
:rows=
"2"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div
style=
"text-align: right;"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitData"
>
确 定
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
get_province_list
}
from
'@/api/student'
;
export
default
{
props
:
[
'itemData'
],
data
()
{
return
{
data_item
:
{},
//烟草信息
city_data
:[],
area_data
:[],
province_data
:[],
};
},
components
:
{},
computed
:
{},
created
()
{
this
.
data_item
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
itemData
));
this
.
get_province_list_fun
()
},
mounted
()
{
console
.
log
(
'详情数据'
);
console
.
log
(
this
.
data_item
);
},
methods
:
{
//取消
handleClose
()
{
this
.
$emit
(
'handleClose'
);
},
//确认
submitData
()
{
const
process_data
=
(
list
)
=>
{
let
data
=
{
...
list
};
return
data
;
}
let
data
=
process_data
(
this
.
data_item
);
this
.
$emit
(
'submitData'
,
data
)
},
//添加数据
addData
()
{
this
.
data_item
.
company_alias
.
push
(
''
);
},
//删除数据
deleteDate
(
index
)
{
this
.
data_item
.
company_alias
.
splice
(
index
,
1
);
},
get_province_list_fun
(
name
=
null
,
type
=
'province'
){
if
(
type
==
'province'
){
this
.
province_data
=
[]
this
.
city_data
=
[]
this
.
area_data
=
[]
}
else
if
(
type
==
'city'
){
this
.
city_data
=
[]
this
.
area_data
=
[]
this
.
data_item
.
city
=
''
;
this
.
data_item
.
area
=
''
;
}
else
if
(
type
==
'area'
){
this
.
area_data
=
[]
this
.
data_item
.
area
=
''
;
}
this
.
fun_get_province_list
(
name
,
type
)
},
fun_get_province_list
(
name
=
null
,
type
=
'province'
){
get_province_list
({
type
:
type
,
name
:
name
,
name_is_value
:
true
}).
then
((
res
)
=>
{
this
[
type
+
'_data'
]
=
res
;
});
},
}
}
</
script
>
<
style
scoped
>
.input_box
{
margin-bottom
:
10px
;
}
.delete_breed
{
color
:
red
;
}
</
style
>
src/views/business/road/index.vue
浏览文件 @
cfc8b2e0
<!-- -->
<
script
>
/**
* @Author: AnthonyD
* @Date: 2023-03-28 10:34:24
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-21 14:57:01
*/
</
script
>
<
template
>
<div>
渠道管理
</div>
<div
class=
"module_container"
>
<div
class=
"card_container"
>
<el-card
class=
"box-card"
>
<table-head
:head_data=
"head_data"
@
search=
"searchEvent"
@
resetting=
"resetting"
@
btnClick=
"btnClick"
></table-head>
<div
class=
"table_container"
>
<el-table
v-loading=
"is_loading"
:data=
"tableData"
style=
"width: 100%; margin-bottom: 20px"
height=
"650"
>
<el-table-column
prop=
"id"
label=
"编号"
width=
"50"
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"公司名称"
></el-table-column>
<el-table-column
prop=
"company_alias"
label=
"别名"
>
<template
slot-scope=
"scope"
>
<el-tag
style=
"margin-bottom:3px"
v-for=
"(i , index) in scope.row.company_alias"
:key=
"index"
:title=
'i'
>
{{
i
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"intro"
label=
"介绍"
>
</el-table-column>
<el-table-column
prop=
"unit_category"
label=
"类别"
>
</el-table-column>
<el-table-column
prop=
"provinces"
label=
"省/市/区"
width=
"250"
>
<
template
slot-scope=
"scope"
>
<el-tag
:title=
'`$
{scope.row.provinces}-${scope.row.city}-${scope.row.area}`'>
{{
scope
.
row
.
provinces
}}
-
{{
scope
.
row
.
city
}}
-
{{
scope
.
row
.
area
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"详细地址"
>
</el-table-column>
<el-table-column
prop=
"remark"
label=
"备注"
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
width=
"150"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
style=
"color: #000"
@
click=
"editTobaccoGrades(scope.row)"
>
编辑
</el-button
>
<el-button
size=
"mini"
type=
"text"
style=
"color: #f56c6c"
@
click=
"deleteTobaccoGrades(scope.row)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
</div>
<div
style=
"text-align: right"
>
<el-pagination
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"request_params.page"
:page-size=
"request_params.limit"
layout=
"total, prev, pager, next"
:total=
"request_params.total"
>
</el-pagination>
</div>
</el-card>
</div>
<el-dialog
:title=
"is_updata_type == 'add' ? '渠道新增' : '渠道修改'"
:visible
.
sync=
"is_dialogVisible"
width=
"900px"
top=
"50px"
:before-close=
"handleClose"
>
<div>
<Dialog
:key=
"is_update"
v-if=
"is_dialogVisible"
:itemData=
"itemData"
@
handleClose=
"handleClose"
@
submitData=
"submitData"
></Dialog>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
TableHead
from
'@/components/TableHead/index'
;
import
Dialog
from
'./components/dialog.vue'
;
import
{
company_list
,
company_save
,
company_update
,
company_show
,
company_delete
}
from
'@/api/company'
;
const
company_template
=
{
"name"
:
''
,
"company_alias"
:[],
"intro"
:
''
,
"unit_category"
:
''
,
"provinces"
:
''
,
"city"
:
''
,
"area"
:
''
,
"address"
:
''
,
"remark"
:
''
,
};
export
default
{
data
()
{
data
()
{
return
{
//头部按钮
head_data
:
{
is_search_show
:
true
,
// search_placeholder: "学员姓名/手机号",
right_buttons
:
[
{
text
:
'新增'
,
icon
:
'el-icon-plus'
,
event
:
'add'
,
},
],
},
//初始化请求参数
request_params
:
{
val
:
''
,
page
:
1
,
limit
:
10
,
total
:
null
,
},
is_loading
:
false
,
tableData
:
[],
is_dialogVisible
:
false
,
is_updata_type
:
'add'
,
is_update
:
false
,
//烟草品级信息
itemData
:
Object
.
assign
({},
company_template
),
//全部烟草品级,用来选择
};
},
components
:
{},
components
:
{
TableHead
,
Dialog
},
computed
:
{},
mounted
(){},
mounted
()
{
this
.
init
();
},
methods
:
{}
}
methods
:
{
searchEvent
(
val
)
{
console
.
log
(
'搜索'
);
console
.
log
(
val
);
this
.
request_params
.
val
=
val
;
this
.
getTobaccoGradesList
();
},
resetting
(
val
)
{
console
.
log
(
'重置'
);
console
.
log
(
val
);
this
.
request_params
.
val
=
null
;
this
.
getTobaccoGradesList
();
},
btnClick
(
val
)
{
console
.
log
(
'右侧按钮'
);
console
.
log
(
val
);
if
(
val
==
'add'
)
this
.
addTobaccoGrades
();
},
init
()
{
this
.
getTobaccoGradesList
();
},
//取消
handleClose
()
{
this
.
is_dialogVisible
=
false
;
},
//提交
submitData
(
val
)
{
let
params
=
this
.
$handleParams
(
val
);
if
(
this
.
is_updata_type
==
'add'
)
{
company_save
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
is_dialogVisible
=
false
;
this
.
getTobaccoGradesList
();
}
});
}
else
{
let
id
=
val
.
id
;
company_update
(
id
,
params
).
then
((
res
)
=>
{
console
.
log
(
'修改'
);
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
is_dialogVisible
=
false
;
this
.
getTobaccoGradesList
();
}
});
}
},
//获取列表
getTobaccoGradesList
()
{
this
.
is_loading
=
true
;
let
params
=
this
.
$removeProperty
(
this
.
request_params
);
company_list
(
params
).
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
||
[];
this
.
request_params
.
total
=
res
.
total
;
this
.
is_loading
=
false
;
});
},
//分页
handleCurrentChange
(
val
)
{
this
.
request_params
.
page
=
val
;
this
.
getTobaccoGradesList
();
},
//新增
addTobaccoGrades
()
{
this
.
is_updata_type
=
'add'
;
this
.
itemData
=
{
...
company_template
};
this
.
itemData
.
company_alias
=
[];
this
.
is_update
=!
this
.
is_update
this
.
is_dialogVisible
=
true
;
},
//修改
editTobaccoGrades
(
item
)
{
this
.
is_updata_type
=
'edit'
;
let
id
=
item
.
id
;
company_show
({
id
:
id
}).
then
((
res
)
=>
{
this
.
itemData
=
{
...
res
};
this
.
itemData
.
company_alias
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
company_alias
));
console
.
log
(
this
.
itemData
)
this
.
is_update
=!
this
.
is_update
this
.
is_dialogVisible
=
true
;
});
},
//删除
deleteTobaccoGrades
(
item
)
{
let
id
=
item
.
id
;
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
company_delete
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
init
();
}
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
,
});
});
},
},
};
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
<
style
lang=
"scss"
scoped
></
style
>
src/views/retrieve/index.vue
浏览文件 @
cfc8b2e0
...
...
@@ -7,10 +7,11 @@
<!-- -->
<
template
>
<div
class=
"retrieve_container"
>
<
img
src=
"/image/log.svg"
alt=
""
class=
"object_logo"
>
<
!--
<img
src=
"/image/log.svg"
alt=
""
class=
"object_logo"
>
--
>
<div
class=
"content_box"
>
<div
class=
"content_body"
>
<h1
class=
"content_title"
>
国家烟草质检中心系统
</h1>
<!--
<h1
class=
"content_title"
>
国家烟草质检中心系统
</h1>
-->
<h1
class=
"content_title"
>
数据管理系统
</h1>
<div>
<el-card
v-if=
"retrieve_type == 'email'"
>
<email-retrieve
@
retrieveType=
"retrieveType"
></email-retrieve>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论