|
|
|
|
@ -85,7 +85,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="附件" prop="files">
|
|
|
|
|
<el-link v-for="item in form.files" target="_blank" :href="item.url" type="primary">{{item.original_name}}</el-link>
|
|
|
|
|
<el-link v-for="item in form.files" target="_blank" :href="item.url" type="primary">
|
|
|
|
|
{{item.original_name}}
|
|
|
|
|
</el-link>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
@ -126,10 +128,10 @@
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isReportSave:false,
|
|
|
|
|
isReportSave: false,
|
|
|
|
|
checkAll: false,
|
|
|
|
|
isIndeterminate: true,
|
|
|
|
|
department_user_id:"",
|
|
|
|
|
department_user_id: "",
|
|
|
|
|
paginations: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 15,
|
|
|
|
|
@ -138,7 +140,7 @@
|
|
|
|
|
show_self: 1,
|
|
|
|
|
tableHeight: 0,
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
dialogShowViewVisible:false,
|
|
|
|
|
dialogShowViewVisible: false,
|
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
|
clientHeight: 0,
|
|
|
|
|
form: {
|
|
|
|
|
@ -261,9 +263,10 @@
|
|
|
|
|
info(obj) {
|
|
|
|
|
var that = this;
|
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
|
console.log("res", res);
|
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
|
// this.$set(that.form,res);
|
|
|
|
|
that.form = result;
|
|
|
|
|
console.log("form", result);
|
|
|
|
|
let _files = [];
|
|
|
|
|
for (var mod of result.files) {
|
|
|
|
|
let m = Object.assign({}, mod);
|
|
|
|
|
@ -273,17 +276,18 @@
|
|
|
|
|
that.form.safety_task_department_id = result.id;
|
|
|
|
|
that.form.safety_task_id = result.safety_task_id;
|
|
|
|
|
that.fileList = _files;
|
|
|
|
|
console.log(this.form);
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
edit(obj,isnew) {
|
|
|
|
|
edit(obj, isnew) {
|
|
|
|
|
this.form = this.$options.data().form;
|
|
|
|
|
this.form.content = "";
|
|
|
|
|
this.form.file_list = [];
|
|
|
|
|
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
|
|
|
|
|
if (isnew) {
|
|
|
|
|
var that = this;
|
|
|
|
|
that.form.content="";
|
|
|
|
|
that.info(obj);
|
|
|
|
|
this.isReportSave = true;
|
|
|
|
|
} else {
|
|
|
|
|
@ -300,7 +304,7 @@
|
|
|
|
|
var that = this;
|
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if(status=="2"){
|
|
|
|
|
if (status == "2") {
|
|
|
|
|
submitsave(that.form).then(response => {
|
|
|
|
|
//console.log(response)
|
|
|
|
|
this.$Message.success('操作成功');
|
|
|
|
|
@ -309,7 +313,7 @@
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
save(that.form).then(response => {
|
|
|
|
|
//console.log(response)
|
|
|
|
|
this.$Message.success('操作成功');
|
|
|
|
|
|