fankui
This commit is contained in:
parent
ea995eb8ca
commit
e551f8fa4b
|
@ -3,8 +3,8 @@ ENV = 'development'
|
|||
|
||||
# base api
|
||||
#VUE_APP_BASE_API = 'http://10.0.11.127:8000/api'
|
||||
#VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'
|
||||
VUE_APP_BASE_API = 'https://testsearch.ctc.ac.cn/api'
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'
|
||||
#VUE_APP_BASE_API = 'https://testsearch.ctc.ac.cn/api'
|
||||
|
||||
#VUE_APP_BASE_API = 'http://47.95.0.242:9101/api'
|
||||
|
||||
|
|
|
@ -104,10 +104,17 @@ export function confirmTaskdept(id) {
|
|||
method: 'put'
|
||||
})
|
||||
}
|
||||
export function updateTaskdept(id,data) {
|
||||
return request({
|
||||
url: `/supervision/taskdept/${id}/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteTaskdept(id) {
|
||||
return request({
|
||||
url: `/supervision/taskdept/${id}/`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,16 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="确认率">
|
||||
<template slot-scope="scope">{{ scope.row.confirm_rate }}%</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否审核反馈">
|
||||
<template slot-scope="scope"> <el-tag v-if="scope.row.is_yes" effect="plain">是</el-tag>
|
||||
<el-tag type="danger" effect="plain" v-else>否</el-tag></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核反馈文件">
|
||||
<template slot-scope="scope" v-if="scope.row.file">
|
||||
<el-link :href="scope.row.file" type="primary">下载</el-link>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
|
|
@ -123,6 +123,12 @@
|
|||
<template slot-scope="scope">
|
||||
{{ scope.row.confirm_rate }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否反馈">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_yes" effect="plain">是</el-tag>
|
||||
<el-tag type="danger" effect="plain" v-else>否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
|
@ -146,9 +152,9 @@
|
|||
scope.row.confirm_rate == 100 &&
|
||||
checkPermission(['task_update'])
|
||||
"
|
||||
type="warning"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleConfirmDept(scope)"
|
||||
@click="handleConfirmFK(scope)"
|
||||
>反馈</el-link
|
||||
>
|
||||
<el-link
|
||||
|
@ -163,6 +169,40 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisibles"
|
||||
|
||||
>
|
||||
<el-form
|
||||
ref="Forms"
|
||||
:model="Taskdept"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
>
|
||||
|
||||
<el-form-item label="反馈文件" prop="template" v-if="dialogVisibles">
|
||||
<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"
|
||||
>
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisibles = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmfk('Forms')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<div slot="header" class="clearfix">
|
||||
|
@ -347,18 +387,21 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
import { gettask, inittask, gettaskdeptall, starttask, appendtask, confirmTaskdept, deleteTaskdept } from "@/api/task";
|
||||
import { gettask, inittask, gettaskdeptall, starttask, appendtask, confirmTaskdept,updateTaskdept, deleteTaskdept } from "@/api/task";
|
||||
import { getRecordList, updateRecords } from "@/api/record";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import taskinit from "@/views/supervision/taskinit";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import recorddo from "@/views/supervision/recorddo";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
export default {
|
||||
components: { Pagination, taskinit, recorddo },
|
||||
data() {
|
||||
return {
|
||||
task: { id: 0 },
|
||||
dialogVisible: false,
|
||||
dialogVisibles: false,
|
||||
dialogType: "new",
|
||||
activeName: "contenttab",
|
||||
contents: [],
|
||||
depts: [],
|
||||
|
@ -376,6 +419,11 @@ export default {
|
|||
action:'init',
|
||||
name:'初始化任务'
|
||||
}
|
||||
,
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList:[],
|
||||
Taskdept:{is_yes:true},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -486,6 +534,60 @@ export default {
|
|||
this.gettaskdeptall()
|
||||
})
|
||||
},
|
||||
//反馈意见
|
||||
handlePreview(file) {
|
||||
if ("url" in file) {
|
||||
window.open(file.url);
|
||||
} else {
|
||||
window.open(file.response.data.path);
|
||||
}
|
||||
},
|
||||
handleUpSuccess(res, file, filelist) {
|
||||
this.Taskdept.file = res.data.path;
|
||||
this.filename = res.data.name;
|
||||
},
|
||||
handleRemove(file, filelist){
|
||||
this.Taskdept.file = null;
|
||||
},
|
||||
handleConfirmFK(scope)
|
||||
{
|
||||
this.Taskdept = Object.assign({}, scope.row); // copy obj
|
||||
|
||||
this.dialogVisibles = true;
|
||||
if (this.Taskdept.file) {
|
||||
this.fileList = [
|
||||
{
|
||||
name:"反馈文件",
|
||||
url: this.Taskdept.file,
|
||||
},
|
||||
];
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Forms"].clearValidate();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
async confirmfk(form) {
|
||||
|
||||
this.$refs[form].validate((valid) => {
|
||||
|
||||
console.log(this.Taskdept)
|
||||
this.Taskdept.is_yes=true;
|
||||
updateTaskdept(this.Taskdept.id,this.Taskdept).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.gettaskdeptall()
|
||||
this.dialogVisibles = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleDeleteDept(scope){
|
||||
deleteTaskdept(scope.row.id).then(res=>{
|
||||
this.gettaskdeptall()
|
||||
|
|
Loading…
Reference in New Issue