Commit 717d6e30 by 袁成

fix:文件列表、文件管理增加分组

parent f36b1934
...@@ -38,7 +38,8 @@ export default { ...@@ -38,7 +38,8 @@ export default {
fileList: [], fileList: [],
fileWidth: '100%', fileWidth: '100%',
modalShow: false, modalShow: false,
fileTitle: '资料下载' fileTitle: '资料下载',
groupId: 'rbc-0'
} }
}, },
created() { created() {
...@@ -48,6 +49,8 @@ export default { ...@@ -48,6 +49,8 @@ export default {
let str = Math.floor(100 / num) + '%' let str = Math.floor(100 / num) + '%'
this.fileTitle = prop.fileTitle this.fileTitle = prop.fileTitle
this.fileWidth = `calc(${str} - 10px)` this.fileWidth = `calc(${str} - 10px)`
let id = prop.groupId? prop.groupId: '0'
this.groupId = 'rbc-' + id
} }
}, },
mounted() { mounted() {
...@@ -58,7 +61,9 @@ export default { ...@@ -58,7 +61,9 @@ export default {
async getFileLList() { async getFileLList() {
const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000` const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000`
const { data } = await GMS.$http.get(url) const { data } = await GMS.$http.get(url)
this.fileList = data this.fileList = data.filter(item => item.category === this.groupId)
console.log('groupId', this.groupId)
console.log('fileList', this.fileList)
console.log({ data }) console.log({ data })
}, },
handleMore() { handleMore() {
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
<FormItem label="标题"> <FormItem label="标题">
<Input v-model="config.fileTitle" placeholder="资料下载"></Input> <Input v-model="config.fileTitle" placeholder="资料下载"></Input>
</FormItem> </FormItem>
<FormItem label="分组">
<Select v-model="config.groupId">
<Option v-for="item in fileGroup" :value="item.value" :key="item.value">{{item.label}}</Option>
</Select>
</FormItem>
</Form> </Form>
</div> </div>
</Panel> </Panel>
...@@ -18,14 +23,6 @@ ...@@ -18,14 +23,6 @@
<script> <script>
export default { export default {
watch: {
// configList: {
// handler(newVal) {
// this.itemSetting.properties = newVal
// },
// deep: true,
// },
},
props: { props: {
itemSetting: { itemSetting: {
type: Array, type: Array,
...@@ -37,8 +34,35 @@ export default { ...@@ -37,8 +34,35 @@ export default {
value1: '1', value1: '1',
config: { config: {
num: 1, num: 1,
fileTitle: '资料下载' fileTitle: '资料下载',
} groupId: '0'
},
fileGroup: [
{
label: '默认分组',
value: '0'
},
{
label: '分组一',
value: '1'
},
{
label: '分组二',
value: '2'
},
{
label: '分组三',
value: '3'
},
{
label: '分组四',
value: '4'
},
{
label: '分组五',
value: '5'
}
]
} }
}, },
created() { created() {
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"less": "^4.1.1", "less": "^4.1.1",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
} }
} }
...@@ -10,6 +10,15 @@ ...@@ -10,6 +10,15 @@
<!-- <Button type="text" @click="handleUpload">上传</Button> --> <!-- <Button type="text" @click="handleUpload">上传</Button> -->
</div> </div>
<div class="file-content"> <div class="file-content">
<div class="content-group">
<Form label-position="right" :label-width="80">
<FormItem label="分组">
<Select v-model="fileGroupId" @on-change="handleGroupChange">
<Option v-for="item in fileGroup" :value="item.value" :key="item.value">{{item.label}}</Option>
</Select>
</FormItem>
</Form>
</div>
<vxe-table <vxe-table
border border
stripe stripe
...@@ -34,7 +43,7 @@ ...@@ -34,7 +43,7 @@
</vxe-column> </vxe-column>
</vxe-table> </vxe-table>
</div> </div>
<fileUpload ref="upload" group-id="0" group-name="rbc" @on-confirm="handleUploadConfirm"></fileUpload> <fileUpload ref="upload" :group-id="fileGroupId" group-name="rbc" @on-confirm="handleUploadConfirm"></fileUpload>
</div> </div>
</template> </template>
<script> <script>
...@@ -64,13 +73,44 @@ export default { ...@@ -64,13 +73,44 @@ export default {
} }
}, },
], ],
tableData: [] tableData: [],
fileGroup: [
{
label: '默认分组',
value: '0'
},
{
label: '分组一',
value: '1'
},
{
label: '分组二',
value: '2'
},
{
label: '分组三',
value: '3'
},
{
label: '分组四',
value: '4'
},
{
label: '分组五',
value: '5'
}
],
fileGroupId: '0'
} }
}, },
created(){ created(){
this.getTableData() this.getTableData()
}, },
methods: { methods: {
handleGroupChange(val) {
this.fileGroupId = val
this.getTableData()
},
handleUploadConfirm() { handleUploadConfirm() {
this.getTableData() this.getTableData()
}, },
...@@ -95,624 +135,8 @@ export default { ...@@ -95,624 +135,8 @@ export default {
async getTableData() { async getTableData() {
const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000` const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000`
const { data } = await GMS.$http.get(url) const { data } = await GMS.$http.get(url)
this.tableData = data let category = 'rbc-' + this.fileGroupId
// this.tableData = [ this.tableData = data.filter(item => item.category === category)
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "a1da5ad9-1296-442d-b044-58438aa06d81",
// "fileName": "新建文本文档.rar",
// "mimeType": "rar",
// "size": 108,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "rbc-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-17T09:52:03Z",
// "properties": {}
// },
// {
// "id": "c685bfbb-1fdb-453f-a941-5bb73e6429eb",
// "fileName": "新建文本文档 (2).txt",
// "mimeType": "txt",
// "size": 27,
// "remark": null,
// "ownerId": "00000000-0000-0000-0000-000000000000",
// "ownerType": "bill",
// "category": "gams2.biz.attachmentgroup-0",
// "creatorId": "0232228d-b2d2-4911-ace6-6a191b594439",
// "creatorName": "ylq",
// "creatorOrg": "01",
// "createTime": "2021-11-16T04:02:06Z",
// "properties": {}
// }
// ]
console.log({ data }) console.log({ data })
}, },
}, },
...@@ -736,7 +160,12 @@ export default { ...@@ -736,7 +160,12 @@ export default {
} }
.file-content { .file-content {
height:calc(100% - 52px); height:calc(100% - 52px);
margin:10px margin:10px;
background: #fff;
.content-group {
padding-top: 18px;
width: 300px;
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -75,6 +75,9 @@ export default { ...@@ -75,6 +75,9 @@ export default {
filesList() { filesList() {
return this.files.filter((item) => item.saveState !== -1) return this.files.filter((item) => item.saveState !== -1)
}, },
url() {
return `${osConfig.baseUrl}/common/attachment/?ownerId=${this.billidParam}&ownerType=bill&category=${this.groupName}-${this.groupId}`
}
}, },
props: { props: {
...@@ -109,7 +112,6 @@ export default { ...@@ -109,7 +112,6 @@ export default {
modalShow: false, modalShow: false,
files: [], files: [],
fileName: '', fileName: '',
url: `${osConfig.baseUrl}/common/attachment/?ownerId=${this.billidParam}&ownerType=bill&category=${this.groupName}-${this.groupId}`,
messageVal: 0, messageVal: 0,
uploadGroupTitle: '', uploadGroupTitle: '',
groupinfo: { groupinfo: {
...@@ -243,19 +245,6 @@ export default { ...@@ -243,19 +245,6 @@ export default {
//取消按钮 //取消按钮
cancel() { cancel() {
this.modalShow = false this.modalShow = false
// let promises = []
// this.filesList.forEach((item) => {
// var url = `/common/attachment/${item.id}`
// promises.push(GMS.$http.delete(url))
// })
// Promise.all(promises)
// .then((res) => {
// this.modalShow = false
// })
// .catch((err) => {
// console.log('附件删除失败', err)
// })
}, },
//查看预览 //查看预览
handleView(list) { handleView(list) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment