布局知识库
This commit is contained in:
+6
-3
@@ -96,17 +96,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<countryCardReleaseModel ref="countryCardReleaseModelRef"/>
|
<countryCardReleaseModel ref="countryCardReleaseModelRef"/>
|
||||||
|
<countryCardReleaseAdd ref="countryCardReleaseAddRef"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||||
import countryCardReleaseModel from './countryCardReleaseModel'
|
import countryCardReleaseModel from './countryCardReleaseModel'
|
||||||
|
import countryCardReleaseAdd from './countryCardReleaseAdd'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'countryCardRelease',
|
name: 'countryCardRelease',
|
||||||
components: {
|
components: {
|
||||||
countryCardReleaseModel
|
countryCardReleaseModel,
|
||||||
|
countryCardReleaseAdd
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -193,7 +196,7 @@
|
|||||||
this.selectedRowKeys = value
|
this.selectedRowKeys = value
|
||||||
},
|
},
|
||||||
newlyAddedClick() {
|
newlyAddedClick() {
|
||||||
|
this.$refs.countryCardReleaseAddRef.add()
|
||||||
},
|
},
|
||||||
templateMaintenanceClick() {
|
templateMaintenanceClick() {
|
||||||
this.$refs.countryCardReleaseModelRef.getData()
|
this.$refs.countryCardReleaseModelRef.getData()
|
||||||
@@ -221,7 +224,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
edit() {
|
edit() {
|
||||||
|
this.$refs.countryCardReleaseAddRef.edit()
|
||||||
},
|
},
|
||||||
subscribe() {
|
subscribe() {
|
||||||
|
|
||||||
|
|||||||
+230
@@ -0,0 +1,230 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="1000"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<div style="margin-bottom: 60px">
|
||||||
|
<a-table
|
||||||
|
:columns="columns"
|
||||||
|
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
|
||||||
|
:data-source="dataList"
|
||||||
|
:pagination="false"
|
||||||
|
:loading="loading">
|
||||||
|
<span slot="content" slot-scope="text,record,index">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-if="false"
|
||||||
|
v-model="record.problemLabel"
|
||||||
|
:placeholder="$t('PleaseEnter')"/>
|
||||||
|
<a-select :placeholder="$t('PleaseSelect')"
|
||||||
|
style="width: 100%"
|
||||||
|
v-if="false"
|
||||||
|
v-model="record.projectNameId">
|
||||||
|
<a-select-option v-for="(item, key) in record.projectNameList"
|
||||||
|
:key="key"
|
||||||
|
:value="item.id">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||||
|
{{ item.projectName}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('verifyDeliverableTemplate',index)">
|
||||||
|
{{ (record.verifyDeliverableTemplate === 'null' || record.verifyDeliverableTemplate === '' ||
|
||||||
|
record.verifyDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
<div class="page" v-if="dataList.length > 0">
|
||||||
|
<a-pagination
|
||||||
|
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||||
|
show-quick-jumper
|
||||||
|
show-size-changer
|
||||||
|
:page-size.sync="pageSize"
|
||||||
|
:total="total"
|
||||||
|
:current="pageNo"
|
||||||
|
@change="onChange"
|
||||||
|
@showSizeChange="SizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||||
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'countryCardReleaseAdd',
|
||||||
|
components: {
|
||||||
|
uploadFile
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
url: {
|
||||||
|
list: '',
|
||||||
|
deleteOne: ''
|
||||||
|
},
|
||||||
|
title: '',
|
||||||
|
visible: false,
|
||||||
|
selectedRowKeys: [],
|
||||||
|
dataList: [{}],
|
||||||
|
loading: false,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
confirmLoading: false,
|
||||||
|
index: '',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: this.$t('LabelName'),
|
||||||
|
dataIndex: 'LabelName',
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('describe'),
|
||||||
|
dataIndex: 'describe',
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('content'),
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 180,
|
||||||
|
scopedSlots: { customRender: 'content' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add() {
|
||||||
|
this.visible = true
|
||||||
|
this.title = this.$t('newlyAdded')
|
||||||
|
},
|
||||||
|
edit() {
|
||||||
|
this.visible = true
|
||||||
|
this.title = this.$t('edit')
|
||||||
|
},
|
||||||
|
clickButtonToUpload(item, index) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
this.index = index
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
this.uploadName = item
|
||||||
|
getAction('sys/common/getFileInfos', { id: this.dataList[this.index][this.uploadName] }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
} else {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 上传文件的回调 */
|
||||||
|
uploadSuccess(data) {
|
||||||
|
let attIdList = []
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.map(item => {
|
||||||
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
this.dataList[this.index][this.uploadName] = attIdList.join(',')
|
||||||
|
this.dataList = [...this.dataList]
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onChange(page, pageSize) {
|
||||||
|
this.pageNo = page
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
SizeChange(page, pageSize) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
replacePage() {
|
||||||
|
let query = {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
postAction(this.url.list, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataList = res.result.records || []
|
||||||
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.total = 0
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.page {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 100;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-title {
|
||||||
|
width: 100%;
|
||||||
|
text-align: right;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.operator-text {
|
||||||
|
cursor: pointer;
|
||||||
|
margin-right: 13px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #040B29;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 38px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px #00B3BE solid;
|
||||||
|
color: #00B3BE;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user