ap-dev 1.2.8 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abap/ConfigPanel/AbapDocHistory.vue +145 -0
- package/abap/ConfigPanel/index.vue +5 -0
- package/dev/ApiPanel/modules/ApiGrid.vue +1423 -1388
- package/dev/ConfigPanel/DevDocHistory.vue +145 -0
- package/dev/ConfigPanel/index.vue +6 -1
- package/dev/DbDesignPanel/DevDbTable.vue +1 -1
- package/dev/DevDoc/index.vue +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ap-container>
|
|
3
|
+
<ap-header margin="1111">
|
|
4
|
+
<el-form ref="searchForm" :model="searchForm" :rules="searchFormRules"
|
|
5
|
+
:inline="true" class="layout-header-form">
|
|
6
|
+
<el-form-item label="搜索:" class="layout-header-form-item" prop="likeStr">
|
|
7
|
+
<el-input v-model="searchForm.likeStr" placeholder="名称"></el-input>
|
|
8
|
+
</el-form-item>
|
|
9
|
+
</el-form>
|
|
10
|
+
<el-button type="primary" @click="searchEvent">查询</el-button>
|
|
11
|
+
</ap-header>
|
|
12
|
+
<ap-main margin="0111">
|
|
13
|
+
<ap-table ref="tDocHistoryRef" :options.sync="docHistoryOpt">
|
|
14
|
+
<template #operate="slotProps">
|
|
15
|
+
<div class="ap-tag" @click="showDetail(slotProps.rowData.fdId)">文档预览</div>
|
|
16
|
+
</template>
|
|
17
|
+
</ap-table>
|
|
18
|
+
</ap-main>
|
|
19
|
+
<el-dialog
|
|
20
|
+
title="文档预览"
|
|
21
|
+
:visible.sync="showDialog" style="height: 100%">
|
|
22
|
+
<ap-doc v-model="docText" style="height: 400px;overflow: scroll;">
|
|
23
|
+
|
|
24
|
+
</ap-doc>
|
|
25
|
+
</el-dialog>
|
|
26
|
+
</ap-container>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
export default {
|
|
31
|
+
name: 'AbapDocHistory',
|
|
32
|
+
data() {
|
|
33
|
+
let columns = [
|
|
34
|
+
{
|
|
35
|
+
prop: 'fdTypeId',
|
|
36
|
+
label: '文档类型Id',
|
|
37
|
+
type: 'input',
|
|
38
|
+
width: '250px'
|
|
39
|
+
} , {
|
|
40
|
+
prop: 'fdName',
|
|
41
|
+
label: '文档名称',
|
|
42
|
+
type: 'input'
|
|
43
|
+
}, {
|
|
44
|
+
prop: 'fdDate',
|
|
45
|
+
label: '文档更新时间',
|
|
46
|
+
type: 'datePicker',
|
|
47
|
+
align:"center",
|
|
48
|
+
datePickerFormat: 'yyyy-MM-dd HH:mm',
|
|
49
|
+
width: '130px'
|
|
50
|
+
}, {
|
|
51
|
+
prop: 'fdBackupDate',
|
|
52
|
+
label: '备份时间',
|
|
53
|
+
type: 'datePicker',
|
|
54
|
+
datePickerFormat: 'yyyy-MM-dd HH:mm',
|
|
55
|
+
align:"center",
|
|
56
|
+
width: '130px'
|
|
57
|
+
} , {
|
|
58
|
+
prop: 'fdName',
|
|
59
|
+
label: '检查信息',
|
|
60
|
+
type: 'input',
|
|
61
|
+
html: (value, row) => {
|
|
62
|
+
if (row.currentName == null) {
|
|
63
|
+
return `<div class="ap-color-red">当前文档已删除</div>`;
|
|
64
|
+
}
|
|
65
|
+
if (row.currentName != row.fdName) {
|
|
66
|
+
return `<div class="ap-color-red">最新文档名称:${row.currentName}</div>`;
|
|
67
|
+
}
|
|
68
|
+
return `<div class="ap-color-green">正常</div>`;
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
prop: 'operate',
|
|
72
|
+
label: '操作',
|
|
73
|
+
type: 'slot',
|
|
74
|
+
slot: "operate",
|
|
75
|
+
align:"center",
|
|
76
|
+
width: '120px',
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
let tableOpt = {
|
|
80
|
+
title: "SAP文档历史表",
|
|
81
|
+
columns: columns,
|
|
82
|
+
dataUrl: "/apd/abap/TAbapDocHistory/getTAbapDocHistoryGridList",
|
|
83
|
+
toolbarBtn: [{btnType: "primary", text: "备份文档", icon: "el-icon-transfer", onClick: this.backupDoc}, "refresh"],
|
|
84
|
+
initData: true, // 默认false
|
|
85
|
+
showSelection: false,
|
|
86
|
+
params: () => {
|
|
87
|
+
return {
|
|
88
|
+
likeStr: this.searchForm.likeStr
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
docHistoryOpt: tableOpt,
|
|
94
|
+
searchForm: {
|
|
95
|
+
likeStr: ""
|
|
96
|
+
},
|
|
97
|
+
searchFormRules: {
|
|
98
|
+
likeStr: [{min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'}]
|
|
99
|
+
},
|
|
100
|
+
showDialog: false,
|
|
101
|
+
docText: ""
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
methods: {
|
|
105
|
+
// 查询
|
|
106
|
+
searchEvent() {
|
|
107
|
+
// 表单rules认证
|
|
108
|
+
this.$refs.searchForm.validate((valid) => {
|
|
109
|
+
if (!valid) {
|
|
110
|
+
this.$message.error('搜索条件格式不正确!');
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
this.$refs.tDocHistoryRef.refresh();
|
|
114
|
+
});
|
|
115
|
+
},
|
|
116
|
+
backupDoc() {
|
|
117
|
+
this.$message.warning("开始备份...");
|
|
118
|
+
this.$request({
|
|
119
|
+
url: "/apd/abap/TAbapDocHistory/backupAbapDoc",
|
|
120
|
+
method: 'post',
|
|
121
|
+
data: {}
|
|
122
|
+
}).then(response => {
|
|
123
|
+
this.$message.success(response.data);
|
|
124
|
+
this.$refs.tDocHistoryRef.refresh();
|
|
125
|
+
})
|
|
126
|
+
},
|
|
127
|
+
showDetail(id) {
|
|
128
|
+
this.showDialog = true;
|
|
129
|
+
this.docText = "...";
|
|
130
|
+
this.$request({
|
|
131
|
+
url: "/apd/abap/TAbapDocHistory/getTAbapDocHistoryByFdId",
|
|
132
|
+
method: 'post',
|
|
133
|
+
data: {
|
|
134
|
+
fdId: id
|
|
135
|
+
}
|
|
136
|
+
}).then(response => {
|
|
137
|
+
this.docText = response.data.fdText;
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
</script>
|
|
143
|
+
|
|
144
|
+
<style scoped>
|
|
145
|
+
</style>
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
<el-tab-pane label="SAP自建表" style="height: 100%;">
|
|
16
16
|
<abap-custom-table/>
|
|
17
17
|
</el-tab-pane>
|
|
18
|
+
<el-tab-pane label="文档历史表" style="height: 100%;">
|
|
19
|
+
<abap-doc-history/>
|
|
20
|
+
</el-tab-pane>
|
|
18
21
|
</el-tabs>
|
|
19
22
|
</template>
|
|
20
23
|
|
|
@@ -24,6 +27,7 @@
|
|
|
24
27
|
import AbapTableCondition from './AbapTableCondition'
|
|
25
28
|
import AbapSql from './AbapSql'
|
|
26
29
|
import AbapCustomTable from './AbapCustomTable'
|
|
30
|
+
import AbapDocHistory from './AbapDocHistory'
|
|
27
31
|
import {hasPermission} from 'ap-util/util/LoginUserUtil'
|
|
28
32
|
|
|
29
33
|
export default {
|
|
@@ -34,6 +38,7 @@
|
|
|
34
38
|
AbapTableCondition,
|
|
35
39
|
AbapSql,
|
|
36
40
|
AbapCustomTable,
|
|
41
|
+
AbapDocHistory
|
|
37
42
|
},
|
|
38
43
|
methods:{
|
|
39
44
|
}
|