| | |
| | | } |
| | | |
| | | .luckysheet-cols-menu { |
| | | z-index: 9004; |
| | | z-index: 9000; |
| | | } |
| | | |
| | | .luckysheet-input-box {z-index:3000} |
| | |
| | | .luckysheet-share-logo,.luckysheet_info_detail_save,.luckysheet_info_detail_update{ |
| | | visibility: hidden; |
| | | } |
| | | |
| | | .el-loading-mask{ |
| | | z-index: 9999; |
| | | } |
| | | |
| | | /* 全局输入框样式 */ |
| | | /* 全局按钮样式 */ |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import { data } from 'jquery'; |
| | | export default { |
| | | props: ['data','title'], |
| | | data() { |
| | | return { |
| | | data: {} |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | methods: { |
| | | templateWrite() { |
| | | $(function() { |
| | | //配置项 |
| | | var options = { |
| | | container: 'luckysheet', |
| | | title: "模板编制", |
| | | lang: "zh", |
| | | showsheetbar: false, |
| | | showstatisticBarConfig: { |
| | | view: false |
| | | }, |
| | | data: [{ |
| | | name: '模板', |
| | | order: '0' |
| | | }], |
| | | enableAddRow: false, |
| | | row: 100, |
| | | enableAddBackTop: false, |
| | | showtoolbarConfig: { |
| | | chart: false, // '图表' |
| | | pivotTable: false, //'数据透视表' |
| | | protection:false, // '工作表保护' |
| | | }, |
| | | cellRightClickConfig: { |
| | | copyAs: false, // 复制为 |
| | | hideRow: false, // 隐藏选中行和显示选中行 |
| | | hideColumn: false, // 隐藏选中列和显示选中列 |
| | | sort: false, // 排序选区 |
| | | filter: false, // 筛选选区 |
| | | chart: false, // 图表生成 |
| | | image: false, // 插入图片 |
| | | matrix: false, // 矩阵操作选区 |
| | | }, |
| | | myFolderUrl: 'http://127.0.0.1/', |
| | | functionButton: '<button onClick="excelClosed()" class="save">保存</button>' |
| | | } |
| | | luckysheet.create(options) |
| | | }) |
| | | if(this.data!=null&&this.data!=''){ |
| | | let option = JSON.parse(this.data) |
| | | option.title = this.title |
| | | luckysheet.create(option) |
| | | }else{ |
| | | $(function() { |
| | | //配置项 |
| | | var options = { |
| | | container: 'luckysheet', |
| | | title: this.title, |
| | | lang: "zh", |
| | | showsheetbar: false, |
| | | showstatisticBarConfig: { |
| | | view: false |
| | | }, |
| | | data: [{ |
| | | name: '模板', |
| | | order: '0' |
| | | }], |
| | | enableAddRow: false, |
| | | row: 100, |
| | | column: 26, |
| | | enableAddBackTop: false, |
| | | showtoolbarConfig: { |
| | | chart: false, // '图表' |
| | | pivotTable: false, //'数据透视表' |
| | | protection:false, // '工作表保护' |
| | | }, |
| | | cellRightClickConfig: { |
| | | copyAs: false, // 复制为 |
| | | hideRow: false, // 隐藏选中行和显示选中行 |
| | | hideColumn: false, // 隐藏选中列和显示选中列 |
| | | sort: false, // 排序选区 |
| | | filter: false, // 筛选选区 |
| | | chart: false, // 图表生成 |
| | | image: false, // 插入图片 |
| | | matrix: false, // 矩阵操作选区 |
| | | }, |
| | | myFolderUrl: 'http://127.0.0.1/', |
| | | functionButton: '<button onClick="excelClosed()" class="save">保存</button>' |
| | | } |
| | | luckysheet.create(options) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <div class="standard-template"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">检验模板</el-col> |
| | | <el-col :span="12" style="padding-left: 20px;">原始记录模板</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button> |
| | | </el-col> |
| | |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.StandardTemplate.selectStandardTemplatePageList" |
| | | :upUrl="$api.enums.upEnum" :delUrl="$api.enums.delEnum" :componentData="componentData" :key="upIndex" /> |
| | | :upUrl="$api.StandardTemplate.upStandardTemplate" :delUrl="$api.StandardTemplate.delStandardTemplate" :componentData="componentData" :key="upIndex" /> |
| | | </div> |
| | | <el-dialog title="模板编制" :visible.sync="isShow" width="80%"> |
| | | <el-dialog title="模板编制" :visible.sync="isShow" width="80%" :before-close="isClose"> |
| | | <div style="width: 100%;height: 80vh;overflow: auto;" v-if="isShow"> |
| | | <Excel></Excel> |
| | | <Excel :data="row.thing" :title="row.name" v-loading="loading"></Excel> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | upIndex: 0, |
| | | addDia: false, |
| | | addPower: true, |
| | | isShow: false |
| | | isShow: false, |
| | | loading: false, |
| | | row: { |
| | | id: null, |
| | | thing: null, |
| | | name: null |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | templateWrite(row) { |
| | | this.isShow = true |
| | | this.row = row |
| | | }, |
| | | closed(){ |
| | | let data = luckysheet.getAllSheets() |
| | | console.log(data); |
| | | this.loading = true |
| | | let data = luckysheet.toJson() |
| | | this.$axios.post(this.$api.StandardTemplate.upStandardTemplate,{ |
| | | id: this.row.id, |
| | | thing: JSON.stringify(data), |
| | | name: luckysheet.getWorkbookName(['name']) |
| | | },{ |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res=>{ |
| | | if (res.code==201) return |
| | | this.loading = false |
| | | this.$message.success('已保存') |
| | | this.isShow = false |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | isClose(done){ |
| | | this.$confirm('是否需要保存?', "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.closed() |
| | | }).catch(()=>{done()}) |
| | | } |
| | | } |
| | | } |
| | |
| | | u: "b2-standard", |
| | | p: "selectStandardTreeList" |
| | | }, { |
| | | v: "检验模板", |
| | | v: "原始记录模板", |
| | | i: "font icon-erjidaohang", |
| | | u: "b2-standard-template", |
| | | p: "selectStandardTemplatePageList" |