工作台稽查文档
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
318954b360
commit
236a565250
|
@ -4067,3 +4067,11 @@ export function copyFileOrFolder(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 工作台-稽查文档授权
|
||||||
|
export function setIsAuthorization(data) {
|
||||||
|
return request({
|
||||||
|
url: `/AuditDocument/setIsAuthorization`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
|
@ -218,11 +218,13 @@ export default {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.name_image{
|
|
||||||
max-width:90%;
|
|
||||||
max-height:100%;
|
|
||||||
|
|
||||||
}
|
.name_image {
|
||||||
|
max-width: 90%;
|
||||||
|
max-height: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.name_pdf {
|
.name_pdf {
|
||||||
background-image: url(@/assets/file_icon/pdf.png);
|
background-image: url(@/assets/file_icon/pdf.png);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{{ $t('common:button:reset') }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item v-if="isManage">
|
||||||
<el-button type="primary" @click.stop="addFolder">
|
<el-button type="primary" @click.stop="addFolder">
|
||||||
{{ $t('trials:trials-workbench:auditDocument:button:addFolder') }}
|
{{ $t('trials:trials-workbench:auditDocument:button:addFolder') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -36,6 +36,9 @@
|
||||||
<el-button type="primary" @click.stop="openFile(true)">
|
<el-button type="primary" @click.stop="openFile(true)">
|
||||||
{{ $t('trials:trials-workbench:auditDocument:button:uploadFolder') }}
|
{{ $t('trials:trials-workbench:auditDocument:button:uploadFolder') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="primary" :disabled="checkList.length <= 0" @click.stop="auth(true)">
|
||||||
|
{{ $t('trials:trials-workbench:auditDocument:button:auth') }}
|
||||||
|
</el-button>
|
||||||
<el-button type="primary" :disabled="checkList.length <= 0" @click.stop="downLoad(checkList)">
|
<el-button type="primary" :disabled="checkList.length <= 0" @click.stop="downLoad(checkList)">
|
||||||
{{ $t('trials:trials-workbench:auditDocument:button:download') }}
|
{{ $t('trials:trials-workbench:auditDocument:button:download') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -71,13 +74,13 @@
|
||||||
:src="OSSclientConfig.basePath + scope.row.FilePath" alt="" class="icon_image">
|
:src="OSSclientConfig.basePath + scope.row.FilePath" alt="" class="icon_image">
|
||||||
<i v-else :class="`icon icon_file icon_${scope.row.FileFormat}`" />
|
<i v-else :class="`icon icon_file icon_${scope.row.FileFormat}`" />
|
||||||
<span class="name" :title="scope.row.Name">{{ scope.row.Name }}</span>
|
<span class="name" :title="scope.row.Name">{{ scope.row.Name }}</span>
|
||||||
<i class="el-icon-edit icon_edit" v-if="hoverId === scope.row.Id"
|
<i class="el-icon-edit icon_edit" v-if="(hoverId === scope.row.Id) && isManage"
|
||||||
@click="addRenameId(scope.row)"
|
@click="addRenameId(scope.row)"
|
||||||
:title="$t('trials:trials-workbench:auditDocument:icon:rename')" />
|
:title="$t('trials:trials-workbench:auditDocument:icon:rename')" />
|
||||||
</span>
|
</span>
|
||||||
<i :class="{ 'el-icon-circle-check': true, 'icon_check': true, isCheck: checkList.includes(scope.row.Id) }"
|
<i :class="{ 'el-icon-circle-check': true, 'icon_check': true, isCheck: checkList.includes(scope.row.Id) }"
|
||||||
@click.stop="addCheck(scope.row)"
|
@click.stop="addCheck(scope.row)"
|
||||||
v-if="hoverId === scope.row.Id || checkList.includes(scope.row.Id)" />
|
v-if="(hoverId === scope.row.Id || checkList.includes(scope.row.Id)) && isManage" />
|
||||||
</div>
|
</div>
|
||||||
<el-input v-model="scope.row.Name" :ref="`renameInp_${scope.row.Id}`" :autofocus="true"
|
<el-input v-model="scope.row.Name" :ref="`renameInp_${scope.row.Id}`" :autofocus="true"
|
||||||
class="renameInp" @blur="rename(scope.row)" v-else />
|
class="renameInp" @blur="rename(scope.row)" v-else />
|
||||||
|
@ -94,9 +97,21 @@
|
||||||
<span>{{ formatFileSize(scope.row) }}</span>
|
<span>{{ formatFileSize(scope.row) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="UpdateTime" :label="$t('trials:trials-workbench:auditDocument:table:updateTime')">
|
<el-table-column prop="IsAuthorization"
|
||||||
|
:label="$t('trials:trials-workbench:auditDocument:table:IsAuthorization')" show-overflow-tooltip
|
||||||
|
sortable="custom" v-if="isManage">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch v-model="scope.row.IsAuthorization" @change="(val) => auth(false, scope.row, val)"
|
||||||
|
:active-value="true" :inactive-value="false" :active-text="$fd('YesOrNo', true)"
|
||||||
|
:inactive-text="$fd('YesOrNo', false)">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="CreateTime" :label="$t('trials:trials-workbench:auditDocument:table:createTime')">
|
<el-table-column prop="UpdateTime" show-overflow-tooltip
|
||||||
|
:label="$t('trials:trials-workbench:auditDocument:table:updateTime')">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CreateTime" show-overflow-tooltip
|
||||||
|
:label="$t('trials:trials-workbench:auditDocument:table:createTime')">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<contextmenu ref="contextmenu" :isCopy="isCopy" :checkList="checkList" @handleMenu="handleMenu" />
|
<contextmenu ref="contextmenu" :isCopy="isCopy" :checkList="checkList" @handleMenu="handleMenu" />
|
||||||
|
@ -114,7 +129,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getAuditDocumentData, addAuditDocument, getBreadcrumbData, updateAuditDocument, deleteAuditDocument, setCurrentVersion, movieFileOrFolder, copyFileOrFolder } from '@/api/trials'
|
import { getAuditDocumentData, addAuditDocument, getBreadcrumbData, updateAuditDocument, deleteAuditDocument, setCurrentVersion, movieFileOrFolder, copyFileOrFolder, setIsAuthorization } from '@/api/trials'
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import contextmenu from './contextmenu.vue'
|
import contextmenu from './contextmenu.vue'
|
||||||
import uploadFiles from '@/views/trials/trials-panel/trial-summary/trial-document/components/uploadFiles.vue'
|
import uploadFiles from '@/views/trials/trials-panel/trial-summary/trial-document/components/uploadFiles.vue'
|
||||||
|
@ -180,9 +195,50 @@ export default {
|
||||||
ctrlKey: false, // 键盘ctrl键是否按下
|
ctrlKey: false, // 键盘ctrl键是否按下
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
isManage() {
|
||||||
|
this.Id = null;
|
||||||
|
this.resetOpt()
|
||||||
|
this.getBreadcrumbData()
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async auth(isArray = true, row, IsAuthorization) {
|
||||||
|
if (!this.isManage) return false
|
||||||
|
try {
|
||||||
|
let data = {}
|
||||||
|
if (isArray) {
|
||||||
|
data = {
|
||||||
|
Ids: this.checkList,
|
||||||
|
IsAuthorization: true,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data = {
|
||||||
|
Ids: [row.Id],
|
||||||
|
IsAuthorization,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let res = await setIsAuthorization(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$t('trials:trials-workbench:auditDocument:message:authSuccessfully')
|
||||||
|
if (isArray) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
if (!isArray) {
|
||||||
|
row.IsAuthorizedView = !row.IsAuthorizedView
|
||||||
|
}
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 新建文件夹
|
// 新建文件夹
|
||||||
addFolder() {
|
addFolder() {
|
||||||
|
if (!this.isManage) return false
|
||||||
let parentData = {}, data = {
|
let parentData = {}, data = {
|
||||||
ParentId: null,
|
ParentId: null,
|
||||||
repeat: 0,
|
repeat: 0,
|
||||||
|
@ -263,6 +319,11 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.searchData.Id = this.Id
|
this.searchData.Id = this.Id
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
if (!this.isManage) {
|
||||||
|
this.searchData.IsAuthorization = true
|
||||||
|
} else {
|
||||||
|
this.searchData.IsAuthorization = null
|
||||||
|
}
|
||||||
let res = await getAuditDocumentData(this.searchData)
|
let res = await getAuditDocumentData(this.searchData)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
|
@ -280,6 +341,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
async downLoad(list) {
|
async downLoad(list) {
|
||||||
|
if (!this.isManage) return false
|
||||||
try {
|
try {
|
||||||
let arr = this.filterExternalIds(this.tableData, list)
|
let arr = this.filterExternalIds(this.tableData, list)
|
||||||
if (arr && arr.length === 1) {
|
if (arr && arr.length === 1) {
|
||||||
|
@ -448,6 +510,7 @@ export default {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
addCheck(row) {
|
addCheck(row) {
|
||||||
|
if (!this.isManage) return false
|
||||||
let index = this.checkList.indexOf(row.Id)
|
let index = this.checkList.indexOf(row.Id)
|
||||||
if (!!~index) {
|
if (!!~index) {
|
||||||
this.checkList.splice(index, 1)
|
this.checkList.splice(index, 1)
|
||||||
|
@ -457,6 +520,7 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
addRenameId(row) {
|
addRenameId(row) {
|
||||||
|
if (!this.isManage) return false
|
||||||
this.renameId = row.Id
|
this.renameId = row.Id
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs[`renameInp_${row.Id}`]) {
|
if (this.$refs[`renameInp_${row.Id}`]) {
|
||||||
|
@ -465,6 +529,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async rename(row) {
|
async rename(row) {
|
||||||
|
if (!this.isManage) return false
|
||||||
try {
|
try {
|
||||||
this.renameId = null
|
this.renameId = null
|
||||||
if (row.Type === 'addFolder') {
|
if (row.Type === 'addFolder') {
|
||||||
|
@ -521,6 +586,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 设置当前版本
|
// 设置当前版本
|
||||||
async setCurrentVersion(Id) {
|
async setCurrentVersion(Id) {
|
||||||
|
if (!this.isManage) return false
|
||||||
try {
|
try {
|
||||||
let data = {
|
let data = {
|
||||||
Id
|
Id
|
||||||
|
@ -535,6 +601,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 复制数据
|
// 复制数据
|
||||||
async copyData(list) {
|
async copyData(list) {
|
||||||
|
if (!this.isManage) return false
|
||||||
try {
|
try {
|
||||||
let DATA = this.getData(this.tableData, this.checkList[0])
|
let DATA = this.getData(this.tableData, this.checkList[0])
|
||||||
let Ids = this.filterExternalIds(this.tableData, list)
|
let Ids = this.filterExternalIds(this.tableData, list)
|
||||||
|
@ -553,6 +620,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 移动数据
|
// 移动数据
|
||||||
async moveData(list) {
|
async moveData(list) {
|
||||||
|
if (!this.isManage) return false
|
||||||
try {
|
try {
|
||||||
let DATA = this.getData(this.tableData, this.checkList[0])
|
let DATA = this.getData(this.tableData, this.checkList[0])
|
||||||
let Ids = this.filterExternalIds(this.tableData, list)
|
let Ids = this.filterExternalIds(this.tableData, list)
|
||||||
|
@ -571,6 +639,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 删除数据
|
// 删除数据
|
||||||
async delData(Ids) {
|
async delData(Ids) {
|
||||||
|
if (!this.isManage) return false
|
||||||
try {
|
try {
|
||||||
let data = { Ids }
|
let data = { Ids }
|
||||||
let res = await deleteAuditDocument(data)
|
let res = await deleteAuditDocument(data)
|
||||||
|
@ -588,6 +657,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 修改数据
|
// 修改数据
|
||||||
async updateData(row) {
|
async updateData(row) {
|
||||||
|
if (!this.isManage) return false
|
||||||
try {
|
try {
|
||||||
let data = {
|
let data = {
|
||||||
AuditDocumentTypeEnum: row.AuditDocumentTypeEnum,
|
AuditDocumentTypeEnum: row.AuditDocumentTypeEnum,
|
||||||
|
@ -608,6 +678,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 新增列表数据
|
// 新增列表数据
|
||||||
async uplaodFile(list) {
|
async uplaodFile(list) {
|
||||||
|
if (!this.isManage) return false
|
||||||
let data = []
|
let data = []
|
||||||
if (this.config.isVersion) {
|
if (this.config.isVersion) {
|
||||||
data.push({
|
data.push({
|
||||||
|
@ -740,6 +811,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openFileNewVersion(faccept) {
|
openFileNewVersion(faccept) {
|
||||||
|
if (!this.isManage) return false
|
||||||
this.faccept = [faccept]
|
this.faccept = [faccept]
|
||||||
this.limitLength = 1
|
this.limitLength = 1
|
||||||
this.config.title = this.$t(
|
this.config.title = this.$t(
|
||||||
|
@ -750,6 +822,7 @@ export default {
|
||||||
this.config.isFolder = false
|
this.config.isFolder = false
|
||||||
},
|
},
|
||||||
openFile(isFolder = false) {
|
openFile(isFolder = false) {
|
||||||
|
if (!this.isManage) return false
|
||||||
this.faccept = [
|
this.faccept = [
|
||||||
'.jpg',
|
'.jpg',
|
||||||
'.jpeg',
|
'.jpeg',
|
||||||
|
@ -800,11 +873,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 版本记录(右键菜单)
|
// 版本记录(右键菜单)
|
||||||
openContextmenu(data) {
|
openContextmenu(data) {
|
||||||
|
if (!this.isManage) return false
|
||||||
let { e, row, type, zIndex } = data
|
let { e, row, type, zIndex } = data
|
||||||
this.$refs.contextmenu.init(e, row, type, zIndex)
|
this.$refs.contextmenu.init(e, row, type, zIndex)
|
||||||
},
|
},
|
||||||
// 单行右键单击(右键菜单)
|
// 单行右键单击(右键菜单)
|
||||||
handleRowContextmenu(row, column, e) {
|
handleRowContextmenu(row, column, e) {
|
||||||
|
if (!this.isManage) return false
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!this.checkList.includes(row.Id)) this.handleRowClick(row, {}, e)
|
if (!this.checkList.includes(row.Id)) this.handleRowClick(row, {}, e)
|
||||||
if (this.checkList.length > 1) return this.$refs.contextmenu.init(e, row, 'files')
|
if (this.checkList.length > 1) return this.$refs.contextmenu.init(e, row, 'files')
|
||||||
|
@ -861,6 +936,7 @@ export default {
|
||||||
handleCellMouseLeave() { this.hoverId = null },
|
handleCellMouseLeave() { this.hoverId = null },
|
||||||
// 右键菜单操作
|
// 右键菜单操作
|
||||||
handleMenu(data) {
|
handleMenu(data) {
|
||||||
|
if (!this.isManage) return false
|
||||||
let { key, row } = data
|
let { key, row } = data
|
||||||
console.log(key, row)
|
console.log(key, row)
|
||||||
this.type = key;
|
this.type = key;
|
||||||
|
@ -938,6 +1014,7 @@ export default {
|
||||||
|
|
||||||
// 键盘事件(按下)
|
// 键盘事件(按下)
|
||||||
keydown(e) {
|
keydown(e) {
|
||||||
|
if (!this.isManage) return false
|
||||||
this.ctrlKey = e.ctrlKey
|
this.ctrlKey = e.ctrlKey
|
||||||
if (e.key === 'Control') {
|
if (e.key === 'Control') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -960,6 +1037,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 键盘事件(松开)
|
// 键盘事件(松开)
|
||||||
keyup(e) {
|
keyup(e) {
|
||||||
|
if (!this.isManage) return false
|
||||||
this.ctrlKey = e.ctrlKey
|
this.ctrlKey = e.ctrlKey
|
||||||
},
|
},
|
||||||
docClick() {
|
docClick() {
|
||||||
|
|
|
@ -331,7 +331,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 稽查文档 -->
|
<!-- 稽查文档 -->
|
||||||
<div class="my_select_box" :class="{ selected: selected === 'viewAuditDocument' }"
|
<div class="my_select_box" :class="{ selected: selected === 'viewAuditDocument' }"
|
||||||
tab-data="viewAuditDocument" @click="selected = 'viewAuditDocument'"
|
tab-data="viewAuditDocument" @click="handleClick('viewAuditDocument')"
|
||||||
v-if="hasPermi(['trials:trials-workbench:viewAuditDocument'])">
|
v-if="hasPermi(['trials:trials-workbench:viewAuditDocument'])">
|
||||||
<div class="my_select_box_content">
|
<div class="my_select_box_content">
|
||||||
<span class="el-icon-folder-checked" style="padding: 4px;margin: 4px;color: #6698ff"></span>
|
<span class="el-icon-folder-checked" style="padding: 4px;margin: 4px;color: #6698ff"></span>
|
||||||
|
@ -349,7 +349,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 稽查文档管理 -->
|
<!-- 稽查文档管理 -->
|
||||||
<div class="my_select_box" :class="{ selected: selected === 'updateAuditDocument' }"
|
<div class="my_select_box" :class="{ selected: selected === 'updateAuditDocument' }"
|
||||||
tab-data="updateAuditDocument" @click="selected = 'updateAuditDocument'"
|
tab-data="updateAuditDocument" @click="handleClick('updateAuditDocument')"
|
||||||
v-if="hasPermi(['trials:trials-workbench:updateAuditDocument'])">
|
v-if="hasPermi(['trials:trials-workbench:updateAuditDocument'])">
|
||||||
<div class="my_select_box_content">
|
<div class="my_select_box_content">
|
||||||
<span class="el-icon-folder-checked" style="padding: 4px;margin: 4px;color: #6698ff"></span>
|
<span class="el-icon-folder-checked" style="padding: 4px;margin: 4px;color: #6698ff"></span>
|
||||||
|
@ -634,6 +634,12 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(key) {
|
||||||
|
this.selected = null;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.selected = key
|
||||||
|
})
|
||||||
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
getUser().then(async res => {
|
getUser().then(async res => {
|
||||||
this.user = res.Result
|
this.user = res.Result
|
||||||
|
|
Loading…
Reference in New Issue