diff --git a/src/views/ofm/borrowfile.vue b/src/views/ofm/borrowfile.vue
index c9ba59f1..910d8293 100644
--- a/src/views/ofm/borrowfile.vue
+++ b/src/views/ofm/borrowfile.vue
@@ -61,6 +61,16 @@
prop="return_date"
min-width="100"
>
+
+
+ {{scope.row.ticket_.state_.name}}
+
+
+
+
+ {{statusOptions[scope.row.ticket_.state_.type]}}
+
+
-
+
@@ -42,7 +42,7 @@
>
-
+
@@ -64,7 +64,7 @@
/>
-
+
({}) },
+ t_id: {
+ type: String,
+ default: null
+ },
},
+
components: {
ticketd, ticketd_b_start
},
data() {
return {
ticketTitle: "档案借阅",
- addForm: {...this.modelValue},
+ addForm: {
+ ticket_: {
+ state_: { type: '' }
+ },
+ borrow_file: [],
+ ...this.modelValue },
+ localMode : this.mode,
query: {},
fileList: [],
ticket_data: {},
@@ -106,22 +117,16 @@ export default {
};
},
mounted(){
- this.getFileList();
+ this.getFileList().then(() => {
+ console.log('fileList:', this.fileList)
+ console.log('addForm.borrow_file:', this.addForm.borrow_file)
+ });
+ if (this.addForm.ticket_?.state_.type===1){
+ this.localMode = 'edit'
+ };
+ this.getTid();
},
watch: {
- modelValue: {
- handler(val) {
- this.addForm = { ...val };
- },
- deep: true,
- },
- // 本地数据变动 -> 同步回父组件
- addForm: {
- handler(val) {
- this.$emit("update:modelValue", val);
- },
- deep: true,
- },
addForm: {
handler(val){
Object.assign(this.ticket_data,{
@@ -136,22 +141,36 @@ export default {
let that = this;
let res = null;
- if (that.mode === "add") {
+ if (that.localMode === "add") {
res = await that.$API.ofm.borrow.create.req(that.addForm);
that.addForm.id = res.id;
- } else if (that.mode === "edit") {
+ } else if (that.localMode === "edit") {
res = await that.$API.ofm.borrow.update.req(
that.addForm.id,
that.addForm
);
}
},
- getFileList() {
- this.$API.ofm.filerecord.list.req(this.query).then((res) => {
+ getFileList() {
+ return this.$API.ofm.filerecord.list.req(this.query).then((res) => {
this.fileList = res.results;
+ console.log('----111---',this.fileList);
});
},
- },
+ getTid (){
+ var that = this;
+ if (that.t_id) {
+ that.$API.ofm.borrow.item.req(that.t_id).then(res=>{
+ that.form = res;
+ if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
+ that.localMode = "edit";
+ }else{
+ that.localMode = "show";
+ }
+ })
+ }
+ },
+ },
};
diff --git a/src/views/ofm/file.vue b/src/views/ofm/file.vue
deleted file mode 100644
index d321851d..00000000
--- a/src/views/ofm/file.vue
+++ /dev/null
@@ -1,313 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 保 存
-
-
-
-
-
-
diff --git a/src/views/ofm/publicity.vue b/src/views/ofm/publicity.vue
index 145e4a1d..9c7fedd8 100644
--- a/src/views/ofm/publicity.vue
+++ b/src/views/ofm/publicity.vue
@@ -68,6 +68,16 @@
prop="dept_opinion_review"
min-width="100"
>
+
+
+ {{scope.row.ticket_.state_.name}}
+
+
+
+
+ {{statusOptions[scope.row.ticket_.state_.type]}}
+
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -47,14 +47,14 @@
placeholder = "请输入名称"
size = "small"
style="margin-top: 10;"
- :disabled="mode==='view'"
+ :disabled="localMode ==='view'"
>
-
+
-
+
@@ -67,11 +67,11 @@
placeholder = "请输入渠道名称"
size = "small"
style="margin-top: 10;"
- :disabled="mode==='view'"
+ :disabled="localMode ==='view'"
>
-
+
@@ -172,6 +172,7 @@ export default {
return {
ticketTitle: "宣传报道",
ticket_data: {},
+ localMode : this.mode,
rules: {
file_name: [
{ required: true, message: "请选择档案", trigger: "blur" },
@@ -189,21 +190,39 @@ export default {
},
},
},
-
+ mounted() {
+ this.getTid();
+ if (this.addForm.ticket_?.state_.type===1){
+ this.localMode = 'edit'
+ }
+ },
methods: {
async submit_b_func() {
let that = this;
let res = null;
- if (that.mode === "add") {
+ if (that.localMode === "add") {
res = await that.$API.ofm.publicity.create.req(that.addForm);
that.addForm.id = res.id;
- } else if (that.mode === "edit"){
+ } else if (that.localMode === "edit"){
res = await that.$API.ofm.publicity.update.req(
that.addForm.id,
that.addForm
);
}
},
+ getTid (){
+ var that = this;
+ if (that.t_id) {
+ that.$API.ofm.publicity.item.req(that.t_id).then(res=>{
+ that.form = res;
+ if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
+ that.localMode = "edit";
+ }else{
+ that.localMode = "show";
+ }
+ })
+ }
+ },
},
};
diff --git a/src/views/ofm/seal.vue b/src/views/ofm/seal.vue
index d0e61753..313ae5f3 100644
--- a/src/views/ofm/seal.vue
+++ b/src/views/ofm/seal.vue
@@ -35,12 +35,12 @@
是
否
+
+
+ {{scope.row.ticket_.state_.name}}
+
+
+
+
+ {{statusOptions[scope.row.ticket_.state_.type]}}
+
+
@@ -144,8 +154,6 @@