Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_adminHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_adminHome
Commits
bc9d56f9
提交
bc9d56f9
authored
3月 13, 2023
作者:
wangjialong209
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
关联试题
上级
6422ecea
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
513 行增加
和
80 行删除
+513
-80
user.js
src/api/user.js
+43
-1
EmailRetrieve.vue
src/views/retrieve/components/EmailRetrieve.vue
+202
-0
PhoneRetrieve.vue
src/views/retrieve/components/PhoneRetrieve.vue
+151
-0
index.vue
src/views/retrieve/index.vue
+13
-56
TableMoudel.vue
.../student/examination_questions/components/TableMoudel.vue
+79
-17
index.vue
src/views/student/examination_questions/detail/index.vue
+25
-6
没有找到文件。
src/api/user.js
浏览文件 @
bc9d56f9
...
@@ -31,10 +31,52 @@ export function getMenu() {
...
@@ -31,10 +31,52 @@ export function getMenu() {
method
:
'get'
,
method
:
'get'
,
})
})
}
}
//退出登录
export
function
logout
()
{
export
function
logout
()
{
return
request
({
return
request
({
url
:
'/api/auth/logout'
,
url
:
'/api/auth/logout'
,
method
:
'post'
method
:
'post'
})
})
}
}
/**
* 忘记密码
* */
//获取短信验证码
export
function
get_short_message_code
(
data
)
{
return
request
({
url
:
'/api/sms/code'
,
method
:
'post'
,
data
})
}
//短信-修改密码
export
function
short_message_updata_user_password
(
data
)
{
return
request
({
url
:
'/api/sms/pwd'
,
method
:
'post'
,
data
})
}
//获取邮箱验证码
export
function
get_email_code
(
data
)
{
return
request
({
url
:
'/api/mail/code'
,
method
:
'post'
,
data
})
}
//邮箱验证码-修改密码
export
function
email_updata_user_password
(
data
)
{
return
request
({
url
:
'/api/mail/pwd'
,
method
:
'post'
,
data
})
}
src/views/retrieve/components/EmailRetrieve.vue
0 → 100644
浏览文件 @
bc9d56f9
<!--
* @Author: czj
* @Date: 2023-03-13 12:00:55
* @Description:
* @FilePath: \AdministrationHome\src\views\retrieve\components\EmailRetrieve.vue
-->
<!-- -->
<
template
>
<div
class=
"write_container"
>
<h3
style=
"margin-bottom: 40px;"
>
邮箱找回
</h3>
<el-form
ref=
"retrieveForm"
:model=
"retrieve_params"
:rules=
"rules"
class=
"login-form"
autocomplete=
"on"
label-position=
"left"
>
<el-form-item
prop=
"email"
>
<span>
邮箱
</span>
<el-input
v-model=
"retrieve_params.email"
></el-input>
</el-form-item>
<el-form-item
prop=
"verification_code"
>
<span>
验证码
</span>
<el-row>
<el-col
:span=
"12"
>
<el-input
type=
"number"
v-model=
"retrieve_params.verification_code"
></el-input>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right;"
>
<el-button
type=
"warning"
:disabled=
"is_repeated_click"
@
click=
"getAuthCode"
>
{{
msg
}}
</el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop=
"new_password"
>
<span>
新密码
</span>
<el-tooltip
v-model=
"capsTooltip1"
content=
"大写锁定打开"
placement=
"right"
manual
>
<el-input
v-model=
"retrieve_params.new_password"
type=
"password"
@
keyup
.
native=
"checkCapslock1"
@
blur=
"capsTooltip1 = false"
>
<!--
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
></i>
-->
</el-input>
</el-tooltip>
</el-form-item>
<el-form-item
prop=
"affirm_password"
>
<span>
确认密码
</span>
<el-tooltip
v-model=
"capsTooltip2"
content=
"大写锁定打开"
placement=
"right"
manual
>
<el-input
v-model=
"retrieve_params.affirm_password"
type=
"password"
@
keyup
.
native=
"checkCapslock2"
@
blur=
"capsTooltip2 = false"
>
<!--
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
></i>
-->
</el-input>
</el-tooltip>
</el-form-item>
</el-form>
<div
style=
"margin-top: 20px;"
>
<el-button
type=
"primary"
style=
"width:100%;"
@
click=
"resettingSubmit"
>
重置密码
</el-button>
</div>
<div>
<el-row>
<el-col
:span=
"12"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"retrieveType"
>
短信找回
</el-button>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right;"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"toLogin"
>
返回登陆
</el-button>
</el-col>
</el-row>
</div>
</div>
</
template
>
<
script
>
import
{
get_email_code
,
email_updata_user_password
}
from
'@/api/user'
;
export
default
{
data
()
{
let
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'请再次输入密码'
))
}
else
if
(
value
!==
this
.
retrieve_params
.
new_password
)
{
callback
(
new
Error
(
'两次输入密码不一致!'
))
}
else
{
callback
()
}
};
return
{
retrieve_params
:
{
email
:
'2664109446@qq.com'
,
//手机号
verification_key
:
''
,
//验证key
verification_code
:
''
,
//短信验证码
new_password
:
''
,
//新密码
affirm_password
:
''
,
//确认密码
},
//表单校验
rules
:
{
email
:
[
{
required
:
true
,
message
:
'请输入邮箱'
,
trigger
:
'blur'
},
],
verification_code
:
[
{
required
:
true
,
message
:
'请输入验证码'
,
trigger
:
'blur'
},
],
new_password
:
[
{
required
:
true
,
message
:
'请输入新密码'
,
trigger
:
'blur'
},
],
affirm_password
:
[
{
required
:
true
,
validator
:
validatePass2
,
trigger
:
'blur'
},
],
},
msg
:
'获取验证码'
,
//验证码按钮信息
is_repeated_click
:
false
,
//是否能重复点击
time
:
null
,
timer
:
null
,
capsTooltip1
:
false
,
capsTooltip2
:
false
,
};
},
components
:
{},
computed
:
{},
mounted
()
{
},
methods
:
{
checkCapslock1
(
e
)
{
const
{
key
}
=
e
this
.
capsTooltip1
=
key
&&
key
.
length
===
1
&&
(
key
>=
'A'
&&
key
<=
'Z'
)
},
checkCapslock2
(
e
)
{
const
{
key
}
=
e
this
.
capsTooltip2
=
key
&&
key
.
length
===
1
&&
(
key
>=
'A'
&&
key
<=
'Z'
)
},
//切换找回方式
retrieveType
()
{
this
.
$emit
(
'retrieveType'
,
'email'
);
},
//返回登录
toLogin
()
{
// this.$router.go(-1);
this
.
$router
.
push
(
'/login'
);
},
//获取验证码
getAuthCode
()
{
this
.
$refs
.
retrieveForm
.
validateField
(
'email'
,
(
errMsg
)
=>
{
//单个验证
if
(
errMsg
)
{
console
.
log
(
'手机号验证未通过'
);
}
else
{
let
email
=
this
.
$Aesencrypt
(
this
.
retrieve_params
.
email
);
get_email_code
({
email
:
email
}).
then
(
res
=>
{
console
.
log
(
'获取验证码回调'
);
console
.
log
(
res
);
this
.
retrieve_params
.
verification_key
=
res
.
key
||
''
;
const
_that
=
this
;
this
.
is_repeated_click
=
true
;
// let time = 60, timer = null;
this
.
time
=
60
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
time
==
0
)
{
_that
.
msg
=
'重新获取验证码'
;
_that
.
is_repeated_click
=
false
;
clearInterval
(
this
.
timer
);
}
else
{
_that
.
msg
=
this
.
time
+
'秒后重新获取'
;
_that
.
is_repeated_click
=
true
;
this
.
time
--
;
}
},
1000
);
})
}
})
},
//重置提交
resettingSubmit
()
{
this
.
$refs
.
retrieveForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
let
params
=
this
.
$handleParams
({
verification_key
:
this
.
retrieve_params
.
verification_key
,
password
:
this
.
retrieve_params
.
affirm_password
,
verification_code
:
this
.
retrieve_params
.
verification_code
,
})
email_updata_user_password
(
params
).
then
(
res
=>
{
console
.
log
(
'邮箱修改密码'
);
console
.
log
(
res
);
})
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.write_container
{
width
:
70%
;
margin
:
0
auto
;
h3
{
text-align
:
center
;
}
}
.el-form-item
{
margin-bottom
:
10px
;
}
</
style
>
src/views/retrieve/components/PhoneRetrieve.vue
0 → 100644
浏览文件 @
bc9d56f9
<!--
* @Author: czj
* @Date: 2023-03-13 12:00:55
* @Description:
* @FilePath: \AdministrationHome\src\views\retrieve\components\PhoneRetrieve.vue
-->
<!-- -->
<
template
>
<div
class=
"write_container"
>
<h3
style=
"margin-bottom: 40px;"
>
短信找回
</h3>
<el-form
ref=
"retrieveForm"
:model=
"retrieve_params"
:rules=
"rules"
class=
"login-form"
autocomplete=
"on"
label-position=
"left"
>
<el-form-item
prop=
"phone"
>
<span>
手机号
</span>
<el-input
v-model=
"retrieve_params.phone"
></el-input>
</el-form-item>
<el-form-item
prop=
"verification_code"
>
<span>
验证码
</span>
<el-row>
<el-col
:span=
"12"
>
<el-input
type=
"number"
v-model=
"retrieve_params.verification_code"
></el-input>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right;"
>
<el-button
type=
"warning"
:disabled=
"is_repeated_click"
@
click=
"getAuthCode"
>
{{
msg
}}
</el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop=
"new_password"
>
<span>
新密码
</span>
<el-input
v-model=
"retrieve_params.new_password"
>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
></i>
</el-input>
</el-form-item>
<el-form-item
prop=
"affirm_password"
>
<span>
确认密码
</span>
<el-input
v-model=
"retrieve_params.affirm_password"
>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
></i>
</el-input>
</el-form-item>
</el-form>
<div
style=
"margin-top: 20px;"
>
<el-button
type=
"primary"
style=
"width:100%;"
>
重置密码
</el-button>
</div>
<div>
<el-row>
<el-col
:span=
"12"
>
<el-button
type=
"text"
size=
"mini"
>
邮箱找回
</el-button>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right;"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"toLogin"
>
返回登陆
</el-button>
</el-col>
</el-row>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
retrieve_params
:
{
phone
:
'2664109446@qq.com'
,
//手机号
verification_key
:
''
,
//验证key
verification_code
:
''
,
//短信验证码
new_password
:
''
,
//新密码
affirm_password
:
''
,
//确认密码
},
//表单校验
rules
:
{
phone
:
[
{
required
:
true
,
message
:
'请输入手机号'
,
trigger
:
'blur'
},
],
verification_code
:
[
{
required
:
true
,
message
:
'请输入验证码'
,
trigger
:
'blur'
},
],
new_password
:
[
{
required
:
true
,
message
:
'请输入新密码'
,
trigger
:
'blur'
},
],
affirm_password
:
[
{
required
:
true
,
message
:
'请确认密码'
,
trigger
:
'blur'
},
],
},
msg
:
'获取验证码'
,
//验证码按钮信息
is_repeated_click
:
false
,
//是否能重复点击
time
:
null
,
timer
:
null
,
};
},
components
:
{},
computed
:
{},
mounted
()
{
},
methods
:
{
//返回登录
toLogin
()
{
// this.$router.go(-1);
this
.
$router
.
push
(
'/login'
);
},
//获取验证码
getAuthCode
()
{
this
.
$refs
.
retrieveForm
.
validateField
(
'phone'
,
(
errMsg
)
=>
{
//单个验证
if
(
errMsg
)
{
console
.
log
(
'手机号验证未通过'
);
}
else
{
let
email
=
this
.
$Aesencrypt
(
this
.
retrieve_params
.
phone
);
get_email_code
({
email
:
email
}).
then
(
res
=>
{
console
.
log
(
'获取验证码回调'
);
console
.
log
(
res
);
const
_that
=
this
;
this
.
is_repeated_click
=
true
;
// let time = 60, timer = null;
this
.
time
=
60
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
time
==
0
)
{
_that
.
msg
=
'重新获取验证码'
;
_that
.
is_repeated_click
=
false
;
clearInterval
(
this
.
timer
);
}
else
{
_that
.
msg
=
this
.
time
+
'秒后重新获取'
;
_that
.
is_repeated_click
=
true
;
this
.
time
--
;
}
},
1000
);
})
}
})
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.write_container
{
width
:
70%
;
margin
:
0
auto
;
h3
{
text-align
:
center
;
}
}
.el-form-item
{
margin-bottom
:
10px
;
}
</
style
>
src/views/retrieve/index.vue
浏览文件 @
bc9d56f9
...
@@ -13,45 +13,12 @@
...
@@ -13,45 +13,12 @@
<h1
class=
"content_title"
>
国家烟草质检中心系统
</h1>
<h1
class=
"content_title"
>
国家烟草质检中心系统
</h1>
<div>
<div>
<el-card>
<el-card>
<div
class=
"write_container"
>
<email-retrieve
@
retrieveType=
"retrieveType"
></email-retrieve>
<h3
style=
"margin-bottom: 40px;"
>
忘记密码
</h3>
<el-form
ref=
"retrieveForm"
class=
"login-form"
autocomplete=
"on"
label-position=
"left"
>
<el-form-item
prop=
"username"
>
<span>
手机号
</span>
<el-input></el-input>
</el-form-item>
<el-form-item
prop=
"username"
>
<span>
手机号
</span>
<el-row>
<el-col
:span=
"13"
>
<el-input></el-input>
</el-col>
<el-col
:span=
"11"
style=
"text-align: right;"
>
<el-button
type=
"primary"
>
发送短信(59)
</el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop=
"username"
>
<span>
新密码
</span>
<el-input>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
></i>
</el-input>
</el-form-item>
<el-form-item
prop=
"username"
>
<span>
确认密码
</span>
<el-input>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-view"
></i>
</el-input>
</el-form-item>
</el-form>
<div
style=
"margin-top: 20px;"
>
<el-button
type=
"primary"
style=
"width:100%;"
>
重置密码
</el-button>
</div>
<div
style=
"text-align: right;"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"toLogin"
>
返回登陆
</el-button>
</div>
</div>
</el-card>
</el-card>
<!--
<el-card>
<phone-retrieve
@
retrieveType=
"retrieveType"
></phone-retrieve>
</el-card>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -59,22 +26,25 @@
...
@@ -59,22 +26,25 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
EmailRetrieve
from
'./components/EmailRetrieve.vue'
;
import
PhoneRetrieve
from
'./components/PhoneRetrieve.vue'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
retrieve_type
:
'email'
,
};
};
},
},
components
:
{},
components
:
{
EmailRetrieve
,
PhoneRetrieve
},
computed
:
{},
computed
:
{},
mounted
()
{
},
mounted
()
{
},
methods
:
{
methods
:
{
toLogin
(
)
{
retrieveType
(
val
)
{
this
.
$router
.
go
(
-
1
);
console
.
log
(
val
);
},
},
}
}
}
}
...
@@ -89,7 +59,7 @@ export default {
...
@@ -89,7 +59,7 @@ export default {
.object_logo
{
.object_logo
{
position
:
absolute
;
position
:
absolute
;
top
:
6
2px
;
top
:
5
2px
;
left
:
70px
;
left
:
70px
;
width
:
165px
;
width
:
165px
;
height
:
50px
;
height
:
50px
;
...
@@ -112,17 +82,4 @@ export default {
...
@@ -112,17 +82,4 @@ export default {
}
}
}
}
}
}
.write_container
{
width
:
70%
;
margin
:
0
auto
;
h3
{
text-align
:
center
;
}
}
.el-form-item
{
margin-bottom
:
10px
;
}
</
style
>
</
style
>
src/views/student/examination_questions/components/TableMoudel.vue
浏览文件 @
bc9d56f9
...
@@ -18,11 +18,36 @@
...
@@ -18,11 +18,36 @@
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<td
colspan=
"1"
>
<div
class=
"table_line_title_box"
>
关联试题
</div>
</td>
<td
colspan=
"2"
>
<div
class=
"select_container"
>
<el-select
v-model=
"table_info.examination_questions_id"
placeholder=
"请选择"
@
change=
"getExaminationQuestionsDetail(table_info.examination_questions_id)"
>
<el-option
v-for=
"item in examination_questions_all_list"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
</td>
<td
colspan=
"1"
>
<div
class=
"select_container"
>
<el-select
v-model=
"table_info.examination_question_detail_id"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"item in examination_question_detail_all_list"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
</td>
</tr>
<tr>
<tr>
<td
style=
"width: 100px;"
>
烟草方位
</td>
<td
style=
"width: 100px;"
>
烟草方位
</td>
<td>
<td>
<div
class=
"select_container"
>
<div
class=
"select_container"
>
<el-select
placeholder=
"请选择"
style=
"width: 100%;"
v-model=
"table_info.area"
>
<el-select
placeholder=
"请选择"
style=
"width: 100%;"
v-model=
"table_info.area"
:disabled=
"table_info.examination_question_detail_id != null && table_info.examination_question_detail_id != ''"
>
<el-option
v-for=
"item in position_data"
:key=
"item.id"
:label=
"item.name"
:value=
"item.name"
>
<el-option
v-for=
"item in position_data"
:key=
"item.id"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
</el-option>
</el-select>
</el-select>
...
@@ -35,7 +60,8 @@
...
@@ -35,7 +60,8 @@
<div
class=
"select_container"
>
<div
class=
"select_container"
>
<el-cascader
style=
"width: 100%;"
v-if=
"province_data"
v-model=
"table_info.province_id"
<el-cascader
style=
"width: 100%;"
v-if=
"province_data"
v-model=
"table_info.province_id"
:options=
"province_data[table_info.area]"
:show-all-levels=
"false"
:props=
"
{ checkStrictly: true }"
:options=
"province_data[table_info.area]"
:show-all-levels=
"false"
:props=
"
{ checkStrictly: true }"
@change="handleChange" clearable filterable>
</el-cascader>
@change="handleChange" clearable filterable
:disabled="table_info.examination_question_detail_id != null
&&
table_info.examination_question_detail_id != ''">
</el-cascader>
</div>
</div>
</td>
</td>
<td
rowspan=
"4"
>
烟叶实物
</td>
<td
rowspan=
"4"
>
烟叶实物
</td>
...
@@ -61,7 +87,8 @@
...
@@ -61,7 +87,8 @@
</td>
</td>
<td
style=
"width: 150px;"
>
<td
style=
"width: 150px;"
>
<div
class=
"select_container"
>
<div
class=
"select_container"
>
<el-select
placeholder=
"请选择"
style=
"width: 100%;"
v-model=
"table_info.grades_code"
>
<el-select
placeholder=
"请选择"
style=
"width: 100%;"
v-model=
"table_info.grades_code"
:disabled=
"table_info.examination_question_detail_id != null && table_info.examination_question_detail_id != ''"
>
<el-option
v-for=
"item in tobacco_grades_all_list"
:key=
"item.id"
:label=
"item.grade_code"
<el-option
v-for=
"item in tobacco_grades_all_list"
:key=
"item.id"
:label=
"item.grade_code"
:value=
"item.grade_code"
>
:value=
"item.grade_code"
>
</el-option>
</el-option>
...
@@ -71,7 +98,8 @@
...
@@ -71,7 +98,8 @@
<td>
得分
</td>
<td>
得分
</td>
<td
style=
"width: 150px;"
>
<td
style=
"width: 150px;"
>
<div
class=
"select_container"
>
<div
class=
"select_container"
>
<el-input
placeholder=
"请输入得分"
v-model=
"table_info.fraction"
type=
"number"
:min=
"3"
>
<el-input
placeholder=
"请输入得分"
v-model=
"table_info.fraction"
type=
"number"
:min=
"3"
:disabled=
"table_info.examination_question_detail_id != null && table_info.examination_question_detail_id != ''"
>
</el-input>
</el-input>
</div>
</div>
</td>
</td>
...
@@ -82,7 +110,8 @@
...
@@ -82,7 +110,8 @@
</td>
</td>
<td
colspan=
"3"
>
<td
colspan=
"3"
>
<div
class=
"select_container"
>
<div
class=
"select_container"
>
<el-select
v-model=
"table_info.breed_name"
placeholder=
"请选择"
style=
"width: 100%;"
filterable
allow-create
>
<el-select
v-model=
"table_info.breed_name"
placeholder=
"请选择"
style=
"width: 100%;"
filterable
allow-create
:disabled=
"table_info.examination_question_detail_id != null && table_info.examination_question_detail_id != ''"
>
<el-option
v-for=
"item in tobacco_all_list"
:key=
"item.id"
:label=
"item.name"
:value=
"item.name"
>
<el-option
v-for=
"item in tobacco_all_list"
:key=
"item.id"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
</el-option>
</el-select>
</el-select>
...
@@ -95,7 +124,8 @@
...
@@ -95,7 +124,8 @@
</td>
</td>
<td
style=
"padding: 0;"
colspan=
"3"
>
<td
style=
"padding: 0;"
colspan=
"3"
>
<div
class=
"select_container"
>
<div
class=
"select_container"
>
<el-input
type=
"textarea"
:rows=
"5"
placeholder=
"请输入内容"
v-model=
"table_info.explain_in_detail"
>
<el-input
type=
"textarea"
:rows=
"5"
placeholder=
"请输入内容"
v-model=
"table_info.explain_in_detail"
:disabled=
"table_info.examination_question_detail_id != null && table_info.examination_question_detail_id != ''"
>
</el-input>
</el-input>
</div>
</div>
</td>
</td>
...
@@ -105,9 +135,9 @@
...
@@ -105,9 +135,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
upload_examination_question_image
,
batch_upload_of_pictures
}
from
'@/api/student'
;
import
{
batch_upload_of_pictures
,
get_examination_questions_detail
}
from
'@/api/student'
;
export
default
{
export
default
{
props
:
[
'table_data'
,
'position_datas'
,
'province_datas'
,
'tobacco_all_lists'
,
'tobacco_grades_all_lists'
,
'is_updata_type'
,
'btn_key'
],
props
:
[
'table_data'
,
'position_datas'
,
'province_datas'
,
'tobacco_all_lists'
,
'tobacco_grades_all_lists'
,
'is_updata_type'
,
'btn_key'
,
'examination_questions_all_lists'
],
data
()
{
data
()
{
return
{
return
{
IP
:
process
.
env
.
VUE_APP_BASE_API
,
IP
:
process
.
env
.
VUE_APP_BASE_API
,
...
@@ -118,6 +148,12 @@ export default {
...
@@ -118,6 +148,12 @@ export default {
province_data
:
{},
province_data
:
{},
tobacco_all_list
:
[],
tobacco_all_list
:
[],
tobacco_grades_all_list
:
[],
tobacco_grades_all_list
:
[],
//全套试题
examination_questions_all_list
:
[],
//试题详情列表
examination_question_detail_all_list
:
[],
};
};
},
},
...
@@ -130,10 +166,14 @@ export default {
...
@@ -130,10 +166,14 @@ export default {
this
.
province_data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
province_datas
));
this
.
province_data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
province_datas
));
this
.
tobacco_all_list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tobacco_all_lists
));
this
.
tobacco_all_list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tobacco_all_lists
));
this
.
tobacco_grades_all_list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tobacco_grades_all_lists
));
this
.
tobacco_grades_all_list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tobacco_grades_all_lists
));
this
.
examination_questions_all_list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
examination_questions_all_lists
));
this
.
table_info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
table_data
));
this
.
table_info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
table_data
));
},
},
mounted
()
{
mounted
()
{
let
id
=
this
.
table_info
.
examination_questions_id
;
if
(
id
)
{
this
.
getExaminationQuestionsDetail
(
id
);
}
},
},
methods
:
{
methods
:
{
...
@@ -170,15 +210,37 @@ export default {
...
@@ -170,15 +210,37 @@ export default {
this
.
$message
.
success
(
'上传成功'
);
this
.
$message
.
success
(
'上传成功'
);
}
}
})
})
},
getExaminationQuestionsDetail
(
id
)
{
get_examination_questions_detail
(
id
,
null
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
examination_question_detail
.
length
>
0
)
{
this
.
examination_question_detail_all_list
=
res
.
examination_question_detail
.
map
((
item
,
index
)
=>
{
return
{
value
:
item
.
id
,
label
:
'题'
+
(
index
+
1
),
};
});
console
.
log
(
this
.
examination_question_detail_all_list
);
}
else
{
this
.
examination_question_detail_all_list
=
[];
}
})
},
// upload_examination_question_image(formData).then(res => {
//联级选择懒加载
// console.log('上传回调');
typeEconomyGetSelectList
(
node
,
resolve
)
{
// console.log(res);
console
.
log
(
node
);
// if (res.err_code == 200) {
let
id
=
node
.
data
.
value
;
// this.table_info.image = res.message;
const
{
level
}
=
node
;
// this.$message.success('上传成功');
get_examination_questions_detail
(
id
,
null
).
then
(
res
=>
{
// }
console
.
log
(
res
);
// })
if
(
res
.
examination_question_detail
.
length
>
0
)
{
let
nodes
=
res
.
examination_question_detail
.
map
((
item
,
index
)
=>
{
return
{
value
:
item
.
id
,
label
:
'题'
+
(
index
+
1
),
};
});
resolve
(
nodes
);
}
else
{
resolve
(
false
);
}
})
},
},
}
}
}
}
...
...
src/views/student/examination_questions/detail/index.vue
浏览文件 @
bc9d56f9
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
<div>
<div>
<table-moudel
v-if=
"is_dialogVisible"
ref=
"detail_info"
:table_data=
"detailed_information"
<table-moudel
v-if=
"is_dialogVisible"
ref=
"detail_info"
:table_data=
"detailed_information"
:position_datas=
"position_data"
:province_datas=
"province_data"
:tobacco_all_lists=
"tobacco_all_lists"
:position_datas=
"position_data"
:province_datas=
"province_data"
:tobacco_all_lists=
"tobacco_all_lists"
:tobacco_grades_all_lists=
"tobacco_grades_all_lists"
:is_updata_type=
"is_updata_type"
></table-moudel>
:tobacco_grades_all_lists=
"tobacco_grades_all_lists"
:is_updata_type=
"is_updata_type"
:examination_questions_all_lists=
"examination_questions_all_list"
></table-moudel>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
@
click=
"handleClose"
>
取 消
</el-button>
...
@@ -82,7 +83,7 @@
...
@@ -82,7 +83,7 @@
import
ExaminationHeader
from
'@/components/ExaminationHeader/index'
;
import
ExaminationHeader
from
'@/components/ExaminationHeader/index'
;
import
TableHead
from
'@/components/TableHead/index'
;
import
TableHead
from
'@/components/TableHead/index'
;
import
TableMoudel
from
'../components/TableMoudel.vue'
;
import
TableMoudel
from
'../components/TableMoudel.vue'
;
import
{
get_examination_questions_detail
,
get_province_list
,
get_tobacco_all_info
,
upload_examination_question_image
,
get_tobacco_grades_all
,
add_examination_question_detail
,
delete_examination_question_detail
,
updata_examination_question_detail
,
examination_question_detail_upload
,
get_tobacco_province
,
batch_upload_of_pictures
,
get_image_path
}
from
'@/api/student'
;
import
{
get_examination_questions_detail
,
get_province_list
,
get_tobacco_all_info
,
upload_examination_question_image
,
get_tobacco_grades_all
,
add_examination_question_detail
,
delete_examination_question_detail
,
updata_examination_question_detail
,
examination_question_detail_upload
,
get_tobacco_province
,
batch_upload_of_pictures
,
get_image_path
,
get_examination_questions_all
}
from
'@/api/student'
;
import
{
exportText
}
from
'@/utils/tool'
;
import
{
exportText
}
from
'@/utils/tool'
;
const
standard_template
=
{
const
standard_template
=
{
area
:
"南方"
,
area
:
"南方"
,
...
@@ -91,11 +92,14 @@ const standard_template = {
...
@@ -91,11 +92,14 @@ const standard_template = {
breed_name
:
"中烟100"
,
breed_name
:
"中烟100"
,
grades_code
:
"C2F"
,
grades_code
:
"C2F"
,
explain_in_detail
:
"fasfas"
,
explain_in_detail
:
"fasfas"
,
image
:
"/"
image
:
"/"
,
examination_questions_id
:
null
,
examination_question_detail_id
:
null
,
//关联试题id
}
}
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
IP
:
process
.
env
.
VUE_APP_BASE_API
,
IP
:
process
.
env
.
VUE_APP_BASE_API
,
examination_questions_id
:
null
,
//试题id
examination_questions_id
:
null
,
//试题id
//头部按钮
//头部按钮
...
@@ -156,6 +160,8 @@ export default {
...
@@ -156,6 +160,8 @@ export default {
province_data
:
{},
province_data
:
{},
//图片列表
//图片列表
picture_file_list
:
[],
picture_file_list
:
[],
//全套试题
examination_questions_all_list
:
[],
};
};
},
},
...
@@ -202,6 +208,7 @@ export default {
...
@@ -202,6 +208,7 @@ export default {
this
.
getTobaccoProvince
();
this
.
getTobaccoProvince
();
this
.
getTobaccoAll
();
this
.
getTobaccoAll
();
this
.
getTobaccoGradesAll
();
this
.
getTobaccoGradesAll
();
this
.
getExaminationQuestionsAll
();
this
.
getExaminationQuestionsDetail
();
this
.
getExaminationQuestionsDetail
();
},
},
...
@@ -240,7 +247,19 @@ export default {
...
@@ -240,7 +247,19 @@ export default {
})
})
}
}
},
},
//获取全套试题
getExaminationQuestionsAll
()
{
this
.
examination_questions_all_list
=
[];
get_examination_questions_all
().
then
(
res
=>
{
console
.
log
(
'获取全套试题'
);
console
.
log
(
res
);
if
(
res
.
length
)
{
res
.
forEach
(
element
=>
{
this
.
examination_questions_all_list
.
push
({
value
:
element
.
id
,
label
:
element
.
title
,
children
:
[],
})
});
}
})
},
//获取详情
//获取详情
getExaminationQuestionsDetail
()
{
getExaminationQuestionsDetail
()
{
this
.
is_loading
=
true
;
this
.
is_loading
=
true
;
...
@@ -332,8 +351,8 @@ export default {
...
@@ -332,8 +351,8 @@ export default {
console
.
log
(
'item单条信息'
);
console
.
log
(
'item单条信息'
);
console
.
log
(
item
);
console
.
log
(
item
);
//获取详情
//获取详情
let
{
id
,
area
,
fraction
,
province_id
,
breed_name
,
grades_code
,
explain_in_detail
,
image
}
=
{
...
item
};
let
{
id
,
area
,
fraction
,
province_id
,
breed_name
,
grades_code
,
explain_in_detail
,
image
,
examination_questions_id
,
examination_question_detail_id
}
=
{
...
item
};
this
.
detailed_information
=
{
id
,
area
,
fraction
,
province_id
,
breed_name
,
grades_code
,
explain_in_detail
,
image
};
this
.
detailed_information
=
{
id
,
area
,
fraction
,
province_id
,
breed_name
,
grades_code
,
explain_in_detail
,
image
,
examination_questions_id
,
examination_question_detail_id
};
this
.
detailed_information
[
'question_no'
]
=
index
+
1
;
this
.
detailed_information
[
'question_no'
]
=
index
+
1
;
this
.
is_dialogVisible
=
true
;
this
.
is_dialogVisible
=
true
;
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论