Browse Source

文件管理 2022-04-25 sxm

master
[li_she] 4 years ago
parent
commit
eac8578ecb
  1. 2
      src/views/modules/common/file-list.vue
  2. 131
      src/views/modules/oss/file-menu.vue
  3. 53
      src/views/modules/oss/oss.vue
  4. 2
      src/views/modules/shopOrder/shopOrder/shopOrder.vue
  5. 4
      src/views/modules/yieldReport/print_roll_label.js

2
src/views/modules/common/file-list.vue

@ -15,7 +15,7 @@
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="fileUploadInit">上传</el-button>
<el-button type="primary" @click="fileUploadInit">上传<i class="el-icon-upload el-icon--right"></i></el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button> <el-button type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>

131
src/views/modules/oss/file-menu.vue

@ -0,0 +1,131 @@
<template>
<el-dialog
title="菜单列表"
@close="close"
:close-on-click-modal="false"
:visible.sync="visible">
<div class="mod-menu">
<el-table
:data="dataList"
v-loading="dataListLoading"
border
:height="tableHeight"
style="width: 100%; ">
<el-table-column
prop="name"
header-align="center"
min-width="150"
label="名称">
</el-table-column>
<el-table-column
prop="parentName"
header-align="center"
align="center"
width="120"
label="上级菜单">
</el-table-column>
<el-table-column
header-align="center"
align="center"
label="图标">
<template slot-scope="scope">
<icon-svg :name="scope.row.icon || ''"></icon-svg>
</template>
</el-table-column>
<el-table-column
prop="type"
header-align="center"
align="center"
label="类型">
<template slot-scope="scope">
<el-link v-if="scope.row.type === 0" type="success">目录</el-link>
<el-link v-else-if="scope.row.type === 1" size="small" type="success">菜单</el-link>
<el-link v-else-if="scope.row.type === 2" size="small" type="info">按钮</el-link>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<a v-if="isAuth('sys:oss:all') && scope.row.type === 1 " type="text" size="small"
@click="helpFileList(scope.row.menuId)">帮助文档</a>
</template>
</el-table-column>
</el-table>
<FileList ref="helpFileList" v-if="helpFileVisible"></FileList>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="visible = false">关闭</el-button>
</span>
</el-dialog>
</template>
<script>
import FileList from '../common/file-list'
import { treeDataTranslate } from '@/utils'
export default {
data() {
return {
// height: 450,
dataForm: {},
dataList: [],
tableHeight: 0,
visible:false,
dataListLoading: false,
addOrUpdateVisible: false,
menuLanguageVisible: false,
helpFileVisible: false,
}
},
components: {
FileList
},
activated() {
this.getDataList()
},
mounted() {
this.$nextTick(() => {
this.tableHeight = (window.innerHeight*0.65);
})
},
methods: {
init(){
this.visible = true
this.getDataList()
},
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/menu/list/'+this.$i18n.locale),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
this.dataList = data.filter( item => item.type === 1 && item.menuType === 'pc')
this.dataListLoading = false
})
},
//
helpFileList(val) {
let fileMappingDto = {
fileId: '',
fileType: '功能帮助文档',
orderRef1: val,
orderRef2: '*',
orderRef3: '*',
}
this.helpFileVisible = true;
this.$nextTick(() => {
this.$refs.helpFileList.init(fileMappingDto)
})
},
close(){
this.dataList = []
}
}
}
</script>

53
src/views/modules/oss/oss.vue

@ -5,7 +5,7 @@
<el-input v-model="dataForm.fileName"></el-input> <el-input v-model="dataForm.fileName"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="getDataList()">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button> <el-button type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
@ -16,7 +16,6 @@
:data="exportData" :data="exportData"
type="xls" type="xls"
:name="exportName" :name="exportName"
:header="exportHeader"
:footer="exportFooter" :footer="exportFooter"
:defaultValue="exportDefaultValue" :defaultValue="exportDefaultValue"
:fetch="createExportData" :fetch="createExportData"
@ -27,7 +26,9 @@
{{ buttons.download }} {{ buttons.download }}
</download-excel> </download-excel>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="openMenuList()">上传<i class="el-icon-upload el-icon--right"></i></el-button>
</el-form-item>
</el-form> </el-form>
<el-table <el-table
:data="dataList" :data="dataList"
@ -69,21 +70,25 @@
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
<FileList ref="helpFileList" v-if="helpFileVisible"></FileList> <FileList ref="helpFileList" v-if="helpFileVisible"></FileList>
<FileMenu ref="fileMenuList"></FileMenu>
</div> </div>
</template> </template>
<script> <script>
import FileList from '../common/file-list' import FileList from '../common/file-list'
import FileMenu from './file-menu.vue'
import axios from "axios"; import axios from "axios";
import Vue from "vue"; import Vue from "vue";
export default { export default {
data() { data() {
return { return {
uploadShow:false,
uploadShow: false,
fileMenuVisible: false,
tableHeight: 0, tableHeight: 0,
helpFileVisible:false,
helpFileVisible: false,
dataForm: { dataForm: {
fileName: '' fileName: ''
}, },
@ -100,7 +105,7 @@ export default {
uploadVisible: false, uploadVisible: false,
columnList: [ columnList: [
{ {
tableId: this.$route.meta.menuId+"OSSHELP",
tableId: this.$route.meta.menuId + "OSSHELP",
tableName: "OSSHELP", tableName: "OSSHELP",
columnProp: "fileName", columnProp: "fileName",
columnLabel: "文件名", columnLabel: "文件名",
@ -118,7 +123,7 @@ export default {
align: 'center' align: 'center'
}, },
{ {
tableId: this.$route.meta.menuId+"OSSHELP",
tableId: this.$route.meta.menuId + "OSSHELP",
tableName: "OSSHELP", tableName: "OSSHELP",
columnProp: "orderInfo", columnProp: "orderInfo",
columnLabel: "功能名称", columnLabel: "功能名称",
@ -136,7 +141,7 @@ export default {
align: 'center' align: 'center'
}, },
{ {
tableId: this.$route.meta.menuId+"OSSHELP",
tableId: this.$route.meta.menuId + "OSSHELP",
tableName: "OSSHELP", tableName: "OSSHELP",
columnProp: "orderRef1", columnProp: "orderRef1",
columnLabel: "功能编码", columnLabel: "功能编码",
@ -154,7 +159,7 @@ export default {
align: 'center' align: 'center'
}, },
{ {
tableId: this.$route.meta.menuId+"OSSHELP",
tableId: this.$route.meta.menuId + "OSSHELP",
tableName: "OSSHELP", tableName: "OSSHELP",
columnProp: "url", columnProp: "url",
columnLabel: "URL地址", columnLabel: "URL地址",
@ -172,7 +177,7 @@ export default {
align: 'center' align: 'center'
}, },
{ {
tableId: this.$route.meta.menuId+"OSSHELP",
tableId: this.$route.meta.menuId + "OSSHELP",
tableName: "OSSHELP", tableName: "OSSHELP",
columnProp: "createdBy", columnProp: "createdBy",
columnLabel: "创建人", columnLabel: "创建人",
@ -190,7 +195,7 @@ export default {
align: 'center' align: 'center'
}, },
{ {
tableId: this.$route.meta.menuId+"OSSHELP",
tableId: this.$route.meta.menuId + "OSSHELP",
tableName: "OSSHELP", tableName: "OSSHELP",
columnProp: "createDate", columnProp: "createDate",
columnLabel: "创建时间", columnLabel: "创建时间",
@ -210,15 +215,16 @@ export default {
], ],
// start // start
exportData: [], exportData: [],
exportName: "帮助文件列表"+this.dayjs().format('YYYYMMDDHHmmss'),
//exportHeader: [""],
exportName: "帮助文件列表" + this.dayjs().format('YYYYMMDDHHmmss'),
//exportHeader: [""],
exportFooter: [], exportFooter: [],
exportDefaultValue: "这一行这一列没有数据", exportDefaultValue: "这一行这一列没有数据",
// end // end
} }
}, },
components: { components: {
FileList
FileList,
FileMenu
}, },
activated() { activated() {
this.getDataList() this.getDataList()
@ -230,12 +236,19 @@ export default {
}) })
}, },
methods: { methods: {
//
openMenuList() {
this.$nextTick(() => {
this.$refs.fileMenuList.init()
})
},
// //
helpFileList(val){
helpFileList(val) {
let fileMappingDto = { let fileMappingDto = {
fileId:'',
fileTypeCode:1,
orderRef1:val,
fileId: '',
fileTypeCode: 1,
orderRef1: val,
orderRef2: '*', orderRef2: '*',
orderRef3: '*', orderRef3: '*',
} }
@ -251,7 +264,7 @@ export default {
responseType: 'blob', responseType: 'blob',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'token':Vue.cookie.get('token')
'token': Vue.cookie.get('token')
} }
}).then(({data}) => { }).then(({data}) => {
// //
@ -342,7 +355,7 @@ export default {
data: this.$http.adornData(ids, false) data: this.$http.adornData(ids, false)
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success( '操作成功')
this.$message.success('操作成功')
this.getDataList() this.getDataList()
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)

2
src/views/modules/shopOrder/shopOrder/shopOrder.vue

@ -1704,9 +1704,7 @@ export default {
await this.getShopOrderSapSOBOM(); await this.getShopOrderSapSOBOM();
// //
const LODOP = this.getLodop() const LODOP = this.getLodop()
debugger;;
if (LODOP && this.orderInfo) { if (LODOP && this.orderInfo) {
LODOP.SET_LICENSES("", "13F0BE83846277CB60918577C6281375", "", ""); LODOP.SET_LICENSES("", "13F0BE83846277CB60918577C6281375", "", "");
LODOP.NewPage(); LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0, 2400, 1400, ""); LODOP.SET_PRINT_PAGESIZE(0, 2400, 1400, "");

4
src/views/modules/yieldReport/print_roll_label.js

@ -1,8 +1,8 @@
/*调用js打印标签*/ /*调用js打印标签*/
import {getLodop} from '@/utils/LodopFuncs.js'
/*打印材料卷标签*/ /*打印材料卷标签*/
export function printMaterialLabel(printData) { export function printMaterialLabel(printData) {
const LODOP = this.getLodop()
const LODOP = getLodop()
if (LODOP) { if (LODOP) {
LODOP.SET_LICENSES("", "13F0BE83846277CB60918577C6281375", "", ""); LODOP.SET_LICENSES("", "13F0BE83846277CB60918577C6281375", "", "");
LODOP.NewPage(); LODOP.NewPage();

Loading…
Cancel
Save