刘翔宇-旅管家 4 years ago
commit a84dedd47d

@ -85,9 +85,7 @@
</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>
@ -128,10 +126,10 @@
},
data() {
return {
isReportSave: false,
isReportSave:false,
checkAll: false,
isIndeterminate: true,
department_user_id: "",
department_user_id:"",
paginations: {
page: 1,
page_size: 15,
@ -140,7 +138,7 @@
show_self: 1,
tableHeight: 0,
dialogFormVisible: false,
dialogShowViewVisible: false,
dialogShowViewVisible:false,
formLabelWidth: "120px",
clientHeight: 0,
form: {
@ -263,10 +261,9 @@
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);
@ -276,18 +273,17 @@
that.form.safety_task_department_id = result.id;
that.form.safety_task_id = result.safety_task_id;
that.fileList = _files;
that.$forceUpdate()
console.log(this.form);
}).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 {
@ -304,7 +300,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('操作成功');
@ -313,7 +309,7 @@
}).catch(error => {
//reject(error)
})
} else {
}else{
save(that.form).then(response => {
//console.log(response)
this.$Message.success('操作成功');

Loading…
Cancel
Save