diff --git a/test_client/src/api/candidate.js b/test_client/src/api/candidate.js
new file mode 100644
index 0000000..4374232
--- /dev/null
+++ b/test_client/src/api/candidate.js
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function getCandidateList(query) {
+ return request({
+ url: '/crm/candidate/',
+ method: 'get',
+ params:query
+ })
+}
\ No newline at end of file
diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js
index af2b724..214f289 100644
--- a/test_client/src/router/index.js
+++ b/test_client/src/router/index.js
@@ -252,13 +252,19 @@ export const asyncRoutes = [
component: Layout,
redirect: '/exammanage/index',
name: 'Exammanage',
- meta: { title: '考试管理', icon: ''},
+ meta: { title: '考证管理', icon: 'component'},
children: [
{
path: 'index',
name: 'exam',
component: () => import('@/views/exam/index.vue'),
- meta: { title: '考试管理', icon: 'component', perms: ['exam_view'] }
+ meta: { title: '正式考试', perms: ['exam_view'] }
+ },
+ {
+ path: 'issue',
+ name: 'issue',
+ component: () => import('@/views/exam/issue.vue'),
+ meta: { title: '出证记录', perms: ['candidate_view'] }
},
]
},
diff --git a/test_client/src/views/exam/issue.vue b/test_client/src/views/exam/issue.vue
new file mode 100644
index 0000000..d1a8618
--- /dev/null
+++ b/test_client/src/views/exam/issue.vue
@@ -0,0 +1,126 @@
+
+
+
+
+ 刷新重置
+
+
+
+
+ {{ scope.row.number }}
+
+
+ {{ scope.row.consumer_name }}
+
+
+ {{ scope.row.ID_number }}
+
+
+ {{ scope.row.workscope_name }}
+
+
+ {{ scope.row.company_name }}
+
+
+ {{ scope.row.start_date }}
+
+
+ {{ scope.row.end_date }}
+
+
+
+ {{ scope.row.create_admin_username }}
+
+
+
+
+ 查看证书
+
+
+
+
+
+
+
+
diff --git a/test_mini/app.js b/test_mini/app.js
index 307bbe3..877e559 100644
--- a/test_mini/app.js
+++ b/test_mini/app.js
@@ -70,9 +70,9 @@ App({
globalData: {
userInfo: {},
userinfo: {}, // 服务器传回的消费者信息
- //host: 'https://apitest.ahctc.cn',
+ host: 'https://apitest.ahctc.cn',
mediahost: 'https://apitest.ahctc.cn',
- host: 'http://127.0.0.1:8000',
+ //host: 'http://127.0.0.1:8000',
//mediahost: 'http://127.0.0.1:8000',
token : '',
rlogin:true
diff --git a/test_mini/pages/admin/exam/detail.js b/test_mini/pages/admin/exam/detail.js
index e4eb023..3fee37e 100644
--- a/test_mini/pages/admin/exam/detail.js
+++ b/test_mini/pages/admin/exam/detail.js
@@ -6,7 +6,10 @@ Page({
* 页面的初始数据
*/
data: {
- exam:{},
+ exam:{
+ qdimgs:[],
+ xcimgs:[]
+ },
tests:[]
},
@@ -16,7 +19,7 @@ Page({
onLoad: function (options) {
if(options.id){
let id = options.id
- that.data.exam.id = id
+ this.data.exam.id = id
api.requesta('/examtest/examtest/', 'GET', {exam:id, pageoff:true}).then(res=>{
this.setData({
tests:res.data
@@ -27,11 +30,31 @@ Page({
getExam: function(){
let id = this.data.exam.id
api.requesta(`/examtest/exam/${id}/`, 'GET').then(res=>{
+ let exam = res.data
+ for(var i=0;i
-
-
-
+
+
+
+
+
+
+
+
+ 签到表图片
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 现场照片
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test_mini/pages/main/main.wxml b/test_mini/pages/main/main.wxml
index b80716f..1b2c954 100644
--- a/test_mini/pages/main/main.wxml
+++ b/test_mini/pages/main/main.wxml
@@ -63,15 +63,6 @@
-
-
-
-
- 考核名额监控
-
-
-
-
diff --git a/test_mini/pages/my/index.wxml b/test_mini/pages/my/index.wxml
index 7659c07..9837a27 100644
--- a/test_mini/pages/my/index.wxml
+++ b/test_mini/pages/my/index.wxml
@@ -71,6 +71,15 @@
个人防护用品检测(铅当量)
+
+
+
+
+ 考核名额监控
+
+
+
+
管理员操作台
@@ -79,10 +88,10 @@
-
diff --git a/test_server/crm/models.py b/test_server/crm/models.py
index b712860..66b5e26 100644
--- a/test_server/crm/models.py
+++ b/test_server/crm/models.py
@@ -105,7 +105,7 @@ class SendCode(CommonModel):
code = models.CharField(max_length=4, verbose_name= '验证码')
class Candidate(CommonModel):
- consumer = models.ForeignKey(Consumer, on_delete=models.CASCADE, related_name='candidate_consumer')
+ consumer = models.ForeignKey(Consumer, on_delete=models.DO_NOTHING, related_name='candidate_consumer')
workscope = models.ForeignKey(WorkScope, on_delete=models.DO_NOTHING, related_name='candidate_workscope')
diff --git a/test_server/crm/serializers.py b/test_server/crm/serializers.py
index e5be1dd..e9e8a88 100644
--- a/test_server/crm/serializers.py
+++ b/test_server/crm/serializers.py
@@ -76,6 +76,7 @@ class ConsumerDetailSerializer(serializers.ModelSerializer):
class CandidateSerializer(serializers.ModelSerializer):
+ create_admin_username = serializers.StringRelatedField(source='create_admin', read_only=True)
class Meta:
model = Candidate
fields = '__all__'
\ No newline at end of file