feature:<master> fix:能力验证结果增加 '/',外部监督结果可以为null
This commit is contained in:
parent
e5df963e99
commit
f74325f26a
|
@ -0,0 +1,57 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
|
||||
|
||||
export function getRcs(query) {
|
||||
return request({
|
||||
url: '/info/qc/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getMyRcs(query) {
|
||||
return request({
|
||||
url: '/info/qc/commentdation_info/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getRc(id) {
|
||||
return request({
|
||||
url: `/info/qc/${id}/`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function updateRc(id, data) {
|
||||
return request({
|
||||
url: `/info/qc/${id}/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function createRc(data) {
|
||||
return request({
|
||||
url: `/info/qc/`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getRc_activate() {
|
||||
return request({
|
||||
url: `/info/qc/activate_info/`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function del_commend(id) {
|
||||
return request({
|
||||
url: `/info/qc/${id}/`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -407,52 +407,52 @@ export const asyncRoutes = [
|
|||
]
|
||||
},
|
||||
//信息收集
|
||||
{
|
||||
path: '/infoCollect',
|
||||
component: Layout,
|
||||
redirect: '/infoCollect/',
|
||||
name: 'informationCollect',
|
||||
meta: { title: '信息收集', icon: 'PT', perms: ['infoCollect'] },
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'reviewStatus',
|
||||
name: 'reviewStatus',
|
||||
component: () => import('@/views/informatiomCollect/reviewStatus.vue'),
|
||||
meta: { title: '评审情况', perms: ['infoCollect_RS'] }
|
||||
},
|
||||
{
|
||||
path: 'qualityCommend',
|
||||
name: 'qualityCommend',
|
||||
component: () => import('@/views/informatiomCollect/qualityCommend.vue'),
|
||||
meta: { title: '质量活动', perms: ['infoCollect_QC'] }
|
||||
},
|
||||
{
|
||||
path: 'qualityActive.',
|
||||
name: 'qualityActive.',
|
||||
component: () => import('@/views/informatiomCollect/qualityActive.vue'),
|
||||
meta: { title: '质量表彰', perms: ['infoCollect_QA'] }
|
||||
},
|
||||
{
|
||||
path: 'laboratoryContact',
|
||||
name: 'laboratoryContact',
|
||||
component: () => import('@/views/informatiomCollect/laboratoryContact.vue'),
|
||||
meta: { title: '实验室联系方式', perms: ['infoCollect_LC'] }
|
||||
},
|
||||
{
|
||||
path: 'externalAuditor',
|
||||
name: 'externalAuditor',
|
||||
component: () => import('@/views/informatiomCollect/externalAuditor.vue'),
|
||||
meta: { title: '外审员情况', perms: ['infoCollect_EA'] }
|
||||
},
|
||||
{
|
||||
path: 'inspectionStats',
|
||||
name: 'inspectionStats',
|
||||
component: () => import('@/views/informatiomCollect/inspectionStats.vue'),
|
||||
meta: { title: '检验检测统计', perms: ['infoCollect_IS'] }
|
||||
},
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/infoCollect',
|
||||
// component: Layout,
|
||||
// redirect: '/infoCollect/',
|
||||
// name: 'informationCollect',
|
||||
// meta: { title: '信息收集', icon: 'PT', perms: ['infoCollect'] },
|
||||
// alwaysShow: true,
|
||||
// children: [
|
||||
// {
|
||||
// path: 'reviewStatus',
|
||||
// name: 'reviewStatus',
|
||||
// component: () => import('@/views/informatiomCollect/reviewStatus.vue'),
|
||||
// meta: { title: '评审情况', perms: ['infoCollect_RS'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'qualityCommend',
|
||||
// name: 'qualityCommend',
|
||||
// component: () => import('@/views/informatiomCollect/qualityCommend.vue'),
|
||||
// meta: { title: '质量活动', perms: ['infoCollect_QC'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'qualityActive.',
|
||||
// name: 'qualityActive.',
|
||||
// component: () => import('@/views/informatiomCollect/qualityActive.vue'),
|
||||
// meta: { title: '质量表彰', perms: ['infoCollect_QA'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'laboratoryContact',
|
||||
// name: 'laboratoryContact',
|
||||
// component: () => import('@/views/informatiomCollect/laboratoryContact.vue'),
|
||||
// meta: { title: '实验室联系方式', perms: ['infoCollect_LC'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'externalAuditor',
|
||||
// name: 'externalAuditor',
|
||||
// component: () => import('@/views/informatiomCollect/externalAuditor.vue'),
|
||||
// meta: { title: '外审员情况', perms: ['infoCollect_EA'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'inspectionStats',
|
||||
// name: 'inspectionStats',
|
||||
// component: () => import('@/views/informatiomCollect/inspectionStats.vue'),
|
||||
// meta: { title: '检验检测统计', perms: ['infoCollect_IS'] }
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/test',
|
||||
component: Layout,
|
||||
|
|
|
@ -4,23 +4,28 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="handleAddFile">新增</el-button>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 10px">
|
||||
<el-table v-loading="listLoading" :data="tableData.results" :hieght="tableHeight" border fit stripe
|
||||
<el-table v-loading="listLoading"
|
||||
:data="tableData.results"
|
||||
border fit stripe height="500px"
|
||||
highlight-current-row>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="文件名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
<el-table-column label="活动名称" prop="name"></el-table-column>
|
||||
<el-table-column label="活动角色" prop="roles">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ac_options[scope.row.roles]}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件描述">
|
||||
<template slot-scope="scope">{{ scope.row.description }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件格式">
|
||||
<template slot-scope="scope">{{ scope.row.file_.mime }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="文件下载">
|
||||
<el-table-column label="合作方" prop="collaborators"></el-table-column>
|
||||
<el-table-column label="组织单位" prop="orgunits"></el-table-column>
|
||||
<el-table-column label="活动地点" prop="place"></el-table-column>
|
||||
<el-table-column label="活动参与单位数量" prop="participations"></el-table-column>
|
||||
<el-table-column label="活动中发挥的作用" prop="function"></el-table-column>
|
||||
<el-table-column label="活动收益" prop="earnings"></el-table-column>
|
||||
<!-- <el-table-column align="center" label="文件下载">
|
||||
<template slot-scope="scope" v-if="scope.row.file_.file">
|
||||
<el-link :href="scope.row.file_.file" type="primary">下载</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" label="操作" width="120px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-link :disabled="!checkPermission(['infoCollect_RS'])" type="primary" size="small"
|
||||
|
@ -31,27 +36,77 @@
|
|||
@click="handleDelete(scope)">删除</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-col :span="12" style="margin-top: 5px;">
|
||||
<div class="cardHead">
|
||||
<span class="cardTitle">质量活动</span>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-table>
|
||||
<pagination v-show="tableData.count > 0" :total="tableData.count" :page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size" @pagination="getTableList" />
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogVisible" :title="dialogType === 'edit' ? '编辑评审' : '新增评审'">
|
||||
<el-dialog :visible.sync="dialogVisible" :title="dialogType === 'edit' ? '编辑' : '新增'">
|
||||
<el-form ref="Form" :model="Content" label-width="80px" label-position="right" :rules="rule">
|
||||
<el-form-item label="评审名称" prop="name">
|
||||
<el-input v-model="Content.name" placeholder="评审名称" />
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="Content.name" placeholder="名称"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="description">
|
||||
<el-input type="textarea" :rows="2" v-model="Content.description" placeholder="评审描述" />
|
||||
<el-form-item label="活动角色">
|
||||
<el-select
|
||||
v-model="Content.roles"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in activateOptions"
|
||||
:key="item.value"
|
||||
:label="item.key"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评审文件" prop="file" v-if="dialogVisible">
|
||||
<el-form-item label="合作方" prop="collaborators">
|
||||
<el-input v-model="Content.collaborators" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="组织单位" prop="orgunits">
|
||||
<el-input v-model="Content.orgunits" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动地点" prop="place">
|
||||
<el-input v-model="Content.place"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动参与单位数量" prop="participations" >
|
||||
<el-input-number
|
||||
v-model="Content.participations"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
:step="1"
|
||||
step-strictly="true"
|
||||
/>
|
||||
<!-- <el-input v-model="Content.participations"></el-input> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="活动中发挥的作用" prop="function" >
|
||||
<el-input v-model="Content.function"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动收益" prop="earnings" >
|
||||
<el-input v-model="Content.earnings"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activate_time">
|
||||
<el-date-picker
|
||||
v-model="Content.activate_time"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width:50%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="文件" prop="file" v-if="dialogVisible">
|
||||
<el-upload ref="upload" :action="upUrl" :on-preview="handlePreview" :on-success="handleUpSuccess"
|
||||
:on-remove="handleRemove" :headers="upHeaders" :file-list="fileList" :limit="1"
|
||||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf">
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
|
@ -66,16 +121,36 @@ import Pagination from "@/components/Pagination"; // secondary package based on
|
|||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { getDictList, getDictTypeList } from "@/api/dict";
|
||||
import { getRcs, createRc, del_activate, updateRc, getMyRcs } from "@/api/qa";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
|
||||
const defaultContent = {
|
||||
name: "",
|
||||
description: "",
|
||||
file: null
|
||||
};
|
||||
name: "",
|
||||
roles: "",
|
||||
collaborators: "",
|
||||
orgunits: "",
|
||||
place: "",
|
||||
activate_time: "",
|
||||
participations: "",
|
||||
function: "",
|
||||
earnings: ""
|
||||
};
|
||||
|
||||
export default {
|
||||
components: { Pagination, Treeselect },
|
||||
data() {
|
||||
data(){
|
||||
return {
|
||||
form: {
|
||||
name: "",
|
||||
roles: "",
|
||||
collaborators: "",
|
||||
orgunits: "",
|
||||
place: "",
|
||||
activate_time: "",
|
||||
participations: "",
|
||||
function: "",
|
||||
earnings: "",
|
||||
},
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList: [],
|
||||
|
@ -95,30 +170,43 @@ export default {
|
|||
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||
},
|
||||
filterOrgText: "",
|
||||
tableHeight: null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
filterOrgText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
// tableHeight: '300px',
|
||||
activateOptions:[
|
||||
{key:'组织方',value:0},
|
||||
{key:'参与方',value:1}
|
||||
],
|
||||
ac_options:{0:'组织方', 1:'参与方'}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||
let height2 = document.getElementsByClassName('elHeader')[0].clientHeight;
|
||||
that.tableHeight = height1 - height2 - 70;
|
||||
console.log(that.tableHeight)
|
||||
that.getList();
|
||||
let that = this;
|
||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||
let height2 = document.getElementsByClassName('elHeader')[0].clientHeight;
|
||||
that.tableHeight = height1 - height2 - 70;
|
||||
console.log(that.tableHeight)
|
||||
that.getList();
|
||||
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getTableList() {
|
||||
this.getList();
|
||||
|
||||
//提交表单
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.dialogType == "new") {
|
||||
this.addData();
|
||||
} else {
|
||||
this.editData();
|
||||
}
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
getTableList(){
|
||||
this.getList()
|
||||
|
||||
},
|
||||
handlePreview(file) {
|
||||
if ("url" in file) {
|
||||
|
@ -142,8 +230,18 @@ export default {
|
|||
},
|
||||
|
||||
getList() {
|
||||
},
|
||||
this.listLoading = true;
|
||||
this.tableData.results =[];
|
||||
this.tableData.count =0;
|
||||
getMyRcs(this.listQuery).then((response) => {
|
||||
console.log(response);
|
||||
if (response.data) {
|
||||
this.tableData = response.data;
|
||||
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
|
@ -181,9 +279,12 @@ export default {
|
|||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
// await deleteDoc(scope.row.id);
|
||||
// this.getList();
|
||||
// this.$message.success("成功");
|
||||
await del_activate(scope.row.id).then(() => {
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
this.getTableList();
|
||||
})
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
|
@ -195,9 +296,23 @@ export default {
|
|||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
console.log(this.Content)
|
||||
|
||||
updateRc(this.Content.id, this.Content).then((response) => {
|
||||
if (response.data) {
|
||||
this.tableData = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
this.dialogVisible = false;
|
||||
this.getTableList();
|
||||
});
|
||||
} else {
|
||||
|
||||
createRc(this.Content).then((response) => {
|
||||
if (response.data) {
|
||||
this.tableData = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
this.dialogVisible = false;
|
||||
this.getTableList();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
@ -205,6 +320,7 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
<style></style>
|
|
@ -4,23 +4,31 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="handleAddFile">新增</el-button>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 10px">
|
||||
<el-table v-loading="listLoading"
|
||||
:data="tableData.results"
|
||||
border fit stripe height="500px"
|
||||
<el-table v-loading="listLoading" :data="tableData.results" :hieght="tableHeight" border fit stripe
|
||||
highlight-current-row>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="活动名称" prop="name"></el-table-column>
|
||||
<el-table-column label="活动角色" prop="roles">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ac_options[scope.row.roles]}}</span>
|
||||
</template>
|
||||
<el-table-column label="项目名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合作方" prop="collaborators"></el-table-column>
|
||||
<el-table-column label="组织单位" prop="orgunits"></el-table-column>
|
||||
<el-table-column label="活动地点" prop="place"></el-table-column>
|
||||
<el-table-column label="活动参与单位数量" prop="participations"></el-table-column>
|
||||
<el-table-column label="活动中发挥的作用" prop="function"></el-table-column>
|
||||
<el-table-column label="活动收益" prop="earnings"></el-table-column>
|
||||
<el-table-column label="表彰名称">
|
||||
<template slot-scope="scope">{{ scope.row.commendation_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="获奖等级">
|
||||
<template slot-scope="scope">{{ scope.row.Awards_level }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="获奖单位">
|
||||
<template slot-scope="scope">{{ scope.row.awardee_company }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="获奖人">
|
||||
<template slot-scope="scope">{{ scope.row.awardee_people }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="颁奖单位">
|
||||
<template slot-scope="scope">{{ scope.row.awarded_by }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="获奖日期">
|
||||
<template slot-scope="scope">{{ scope.row.awarded_by }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column align="center" label="文件下载">
|
||||
<template slot-scope="scope" v-if="scope.row.file_.file">
|
||||
<el-link :href="scope.row.file_.file" type="primary">下载</el-link>
|
||||
|
@ -36,71 +44,43 @@
|
|||
@click="handleDelete(scope)">删除</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-col :span="12" style="margin-top: 5px;">
|
||||
<div class="cardHead">
|
||||
<span class="cardTitle">质量活动</span>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-table>
|
||||
<pagination v-show="tableData.count > 0" :total="tableData.count" :page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size" @pagination="getTableList" />
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogVisible" :title="dialogType === 'edit' ? '编辑' : '新增'">
|
||||
<el-form ref="Form" :model="Content" label-width="80px" label-position="right" :rules="rule">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="Content.name" placeholder="名称"/>
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input v-model="Content.name" placeholder="项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动角色">
|
||||
<el-select
|
||||
v-model="Content.roles"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in activateOptions"
|
||||
:key="item.value"
|
||||
:label="item.key"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="表彰名称" prop="commendation_name">
|
||||
<el-input v-model="Content.commendation_name" placeholder="表彰名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合作方" prop="collaborators">
|
||||
<el-input v-model="Content.collaborators" ></el-input>
|
||||
<el-form-item label="获奖等级" prop="awardee_company">
|
||||
<el-input v-model="Content.awardee_company" placeholder="获奖等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="组织单位" prop="orgunits">
|
||||
<el-input v-model="Content.orgunits" ></el-input>
|
||||
<el-form-item label="获奖单位" prop="Awards_level">
|
||||
<el-input v-model="Content.Awards_level" placeholder="获奖单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动地点" prop="place">
|
||||
<el-input v-model="Content.place"></el-input>
|
||||
<el-form-item label="获奖人" prop="awardee_people">
|
||||
<el-input v-model="Content.awardee_people" placeholder="获奖人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动参与单位数量" prop="participations" >
|
||||
<el-input-number
|
||||
v-model="Content.participations"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
:step="1"
|
||||
step-strictly="true"
|
||||
/>
|
||||
<!-- <el-input v-model="Content.participations"></el-input> -->
|
||||
<el-form-item label="颁奖单位" prop="awarded_by">
|
||||
<el-input v-model="Content.awarded_by" placeholder="颁奖单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动中发挥的作用" prop="function" >
|
||||
<el-input v-model="Content.function"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动收益" prop="earnings" >
|
||||
<el-input v-model="Content.earnings"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activate_time">
|
||||
<el-form-item label="获奖日期" prop="awarded_date">
|
||||
<el-date-picker
|
||||
v-model="Content.activate_time"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width:50%"
|
||||
>
|
||||
</el-date-picker>
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="文件" prop="file" v-if="dialogVisible">
|
||||
<!-- <el-form-item label="" prop="description">
|
||||
<el-input type="textarea" :rows="2" v-model="Content.description" placeholder="评审描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="评审文件" prop="file" v-if="dialogVisible">
|
||||
<el-upload ref="upload" :action="upUrl" :on-preview="handlePreview" :on-success="handleUpSuccess"
|
||||
:on-remove="handleRemove" :headers="upHeaders" :file-list="fileList" :limit="1"
|
||||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf">
|
||||
|
@ -121,35 +101,29 @@ import Pagination from "@/components/Pagination"; // secondary package based on
|
|||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { getDictList, getDictTypeList } from "@/api/dict";
|
||||
import { getRcs, createRc, del_activate, updateRc, getMyRcs } from "@/api/qa";
|
||||
import { getRcs, createRc, del_commend, updateRc, getMyRcs } from "@/api/qc";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
|
||||
const defaultContent = {
|
||||
name: "",
|
||||
roles: "",
|
||||
collaborators: "",
|
||||
orgunits: "",
|
||||
place: "",
|
||||
activate_time: "",
|
||||
participations: "",
|
||||
function: "",
|
||||
earnings: ""
|
||||
};
|
||||
|
||||
name: "",
|
||||
commendation_name: "",
|
||||
Awards_level: "",
|
||||
awardee_company: "",
|
||||
awardee_people: "",
|
||||
awarded_by: "",
|
||||
awarded_date: ""
|
||||
};
|
||||
export default {
|
||||
components: { Pagination, Treeselect },
|
||||
data(){
|
||||
return {
|
||||
form: {
|
||||
name: "",
|
||||
roles: "",
|
||||
collaborators: "",
|
||||
orgunits: "",
|
||||
place: "",
|
||||
activate_time: "",
|
||||
participations: "",
|
||||
function: "",
|
||||
earnings: "",
|
||||
commendation_name: "",
|
||||
Awards_level: "",
|
||||
awardee_company: "",
|
||||
awardee_people: "",
|
||||
awarded_by: "",
|
||||
awarded_date: ""
|
||||
},
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
|
@ -170,43 +144,30 @@ export default {
|
|||
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||
},
|
||||
filterOrgText: "",
|
||||
// tableHeight: '300px',
|
||||
activateOptions:[
|
||||
{key:'组织方',value:0},
|
||||
{key:'参与方',value:1}
|
||||
],
|
||||
ac_options:{0:'组织方', 1:'参与方'}
|
||||
}
|
||||
tableHeight: null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
filterOrgText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||
let height2 = document.getElementsByClassName('elHeader')[0].clientHeight;
|
||||
that.tableHeight = height1 - height2 - 70;
|
||||
console.log(that.tableHeight)
|
||||
that.getList();
|
||||
let that = this;
|
||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||
let height2 = document.getElementsByClassName('elHeader')[0].clientHeight;
|
||||
that.tableHeight = height1 - height2 - 70;
|
||||
console.log(that.tableHeight)
|
||||
that.getList();
|
||||
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
//提交表单
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.dialogType == "new") {
|
||||
this.addData();
|
||||
} else {
|
||||
this.editData();
|
||||
}
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
getTableList(){
|
||||
this.getList()
|
||||
|
||||
getTableList() {
|
||||
this.getList();
|
||||
},
|
||||
handlePreview(file) {
|
||||
if ("url" in file) {
|
||||
|
@ -237,12 +198,11 @@ export default {
|
|||
console.log(response);
|
||||
if (response.data) {
|
||||
this.tableData = response.data;
|
||||
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
@ -279,12 +239,9 @@ export default {
|
|||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await del_activate(scope.row.id).then(() => {
|
||||
await del_commend(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
this.getTableList();
|
||||
})
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
|
@ -324,4 +281,3 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style></style>
|
||||
@/api/qa
|
|
@ -315,6 +315,7 @@
|
|||
ref="saveOinDialog"
|
||||
@success="oinSaveSuccess"
|
||||
@closed="dialogOin = false"
|
||||
@close_dialog="close_dialog"
|
||||
>
|
||||
</saveoin-dialog>
|
||||
</el-col>
|
||||
|
@ -979,6 +980,9 @@
|
|||
})
|
||||
that.getList();
|
||||
},
|
||||
close_dialog(){
|
||||
this.dialogOin = false
|
||||
},
|
||||
resetFilter() {
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
|
|
|
@ -65,10 +65,10 @@
|
|||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip">
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
<div style="text-align: right">
|
||||
<!-- <div style="text-align: right">
|
||||
<el-button type="danger" @click="impDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit()">确认</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="结果告知单" prop="file">
|
||||
<el-upload
|
||||
|
@ -84,7 +84,7 @@
|
|||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="impDialogVisible = false">取消</el-button>
|
||||
<el-button type="danger" @click = "close_dialog()">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit_result()">确认</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
@ -145,12 +145,20 @@
|
|||
this.dialogVisible = true;
|
||||
return this;
|
||||
},
|
||||
|
||||
close_dialog(){
|
||||
this.impDialogVisible = false;
|
||||
this.$emit('close_dialog');
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
console.log(data);
|
||||
console.log("111111111111111")
|
||||
Object.assign(this.form, data);
|
||||
if(data.notification_form){
|
||||
this.fileList = [{ name: data.notification_form.split('/')[5], value: data.notification_form }];
|
||||
}else if(data.result_form){
|
||||
console.log(data.result_form.split('/'))
|
||||
this.fileList_res = [{ name: data.result_form.split('/')[5], value: data.result_form }];
|
||||
}
|
||||
},
|
||||
|
|
|
@ -122,6 +122,7 @@ import { options } from "runjs";
|
|||
edit: "能力验证结果编辑",
|
||||
},
|
||||
options:[
|
||||
{key:'/',value:0},
|
||||
{key:'满意',value:10},
|
||||
{key:'有问题',value:20},
|
||||
{key:'不满意',value:30}
|
||||
|
|
|
@ -150,7 +150,8 @@ class QualityCommendationViewSet(ImpMixin, ModelViewSet):
|
|||
child_dept = get_child_queryset2(father_dept)
|
||||
query = QualityCommendation.objects.filter(department__in=child_dept)
|
||||
serializer = QualityCommendationSerializer(query, many=True)
|
||||
return Response(serializer.data)
|
||||
data = {'count':len(serializer.data), 'results':serializer.data}
|
||||
return Response(data, status = status.HTTP_200_OK)
|
||||
|
||||
|
||||
# 质量活动
|
||||
|
@ -159,7 +160,6 @@ class QualityActivitiesViewSet(ModelViewSet):
|
|||
serializer_class = QualityActivitiesSerializer
|
||||
|
||||
def create(self, request):
|
||||
print("---------------------", self.request.data)
|
||||
if Organization.objects.filter(name=self.request.data['orgunits']).exists():
|
||||
department_id = Organization.objects.filter(name=self.request.data['orgunits']).first().id
|
||||
self.request.data['department'] = department_id
|
||||
|
@ -177,7 +177,6 @@ class QualityActivitiesViewSet(ModelViewSet):
|
|||
query = QualityActivities.objects.filter(department__in=child_dept)
|
||||
serializer = QualityActivitiesSerializer(query, many=True)
|
||||
data = {'count':len(serializer.data), 'results':serializer.data}
|
||||
print("return Response(serializer.data)", data)
|
||||
return Response(data, status = status.HTTP_200_OK)
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# Generated by Django 3.2.12 on 2024-04-01 08:19
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
from django.utils.timezone import utc
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('supervision', '0064_auto_20240326_1004'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='oinspect',
|
||||
name='result',
|
||||
field=models.TextField(blank=True, default='', null=True, verbose_name='检查结果'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='oinspect',
|
||||
name='result_date',
|
||||
field=models.DateField(default=datetime.datetime(2024, 4, 1, 8, 19, 8, 965907, tzinfo=utc), verbose_name='检查结果日期'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pt',
|
||||
name='result',
|
||||
field=models.PositiveSmallIntegerField(blank=True, choices=[(10, '满意'), (20, '有问题'), (30, '不满意')], default=None, help_text="((10, '满意'), (20, '有问题'), (30, '不满意'))", null=True, verbose_name='结果'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,25 @@
|
|||
# Generated by Django 3.2.12 on 2024-04-01 08:41
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
from django.utils.timezone import utc
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('supervision', '0065_auto_20240401_1619'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='oinspect',
|
||||
name='result_date',
|
||||
field=models.DateField(default=datetime.datetime(2024, 4, 1, 8, 41, 22, 34090, tzinfo=utc), verbose_name='检查结果日期'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pt',
|
||||
name='result',
|
||||
field=models.PositiveSmallIntegerField(choices=[(0, '/'), (10, '满意'), (20, '有问题'), (30, '不满意')], default=0, help_text="((0, '/'), (10, '满意'), (20, '有问题'), (30, '不满意'))", verbose_name='结果'),
|
||||
),
|
||||
]
|
|
@ -235,6 +235,7 @@ class Pt(CommonBDModel):
|
|||
"""能力验证
|
||||
"""
|
||||
pt_result_choices = (
|
||||
(0, '/'),
|
||||
(10, '满意'),
|
||||
(20, '有问题'),
|
||||
(30, '不满意')
|
||||
|
@ -253,7 +254,7 @@ class Pt(CommonBDModel):
|
|||
number = models.CharField('编号', max_length=100)
|
||||
organizer = models.CharField('组织方', max_length=100)
|
||||
params = models.TextField('参加参数名称')
|
||||
result = models.PositiveSmallIntegerField('结果', choices=pt_result_choices, default=10, help_text=str(pt_result_choices))
|
||||
result = models.PositiveSmallIntegerField('结果', choices=pt_result_choices, default=0, help_text=str(pt_result_choices))
|
||||
handle_result = models.PositiveSmallIntegerField('处理结果', choices = pt_hresult_choices, default=0, help_text=str(pt_hresult_choices))
|
||||
certificate_date = models.DateField('证书日期')
|
||||
field = models.PositiveSmallIntegerField('领域', choices=field_choices, help_text=str(field_choices),default=0)
|
||||
|
@ -292,7 +293,7 @@ class Oinspect(CommonBDModel):
|
|||
cate = models.PositiveSmallIntegerField('检查分类', choices=oinspect_cate_choices, default=30, help_text=str(oinspect_cate_choices))
|
||||
checker = models.CharField('检查方', max_length=100)
|
||||
date_inspect = models.DateField('检查日期')
|
||||
result = models.TextField('检查结果')
|
||||
result = models.TextField('检查结果', null=True, blank=True, default='')
|
||||
result_date = models.DateField('检查结果日期', default=timezone.now())
|
||||
notification_form = models.CharField('检查通知单', max_length=100, null=True)
|
||||
result_form = models.CharField('检查结果告知单', max_length=100, null=True)
|
||||
|
|
Loading…
Reference in New Issue