Browse Source

六步法和三卡

lbj
sd 1 month ago
parent
commit
b0eda7277d
  1. 691
      ruoyi-ui/public/dataCard.html
  2. BIN
      ruoyi-ui/public/logo.png
  3. BIN
      ruoyi-ui/public/logo2.jpg
  4. 228
      ruoyi-ui/public/stepEditor.html
  5. 1
      ruoyi-ui/src/assets/icons/svg/shujukapian.svg
  6. 4
      ruoyi-ui/src/views/childRoom/index.vue

691
ruoyi-ui/public/dataCard.html

@ -0,0 +1,691 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据卡</title>
<link rel="stylesheet" href="./element-ui.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: #fafafa;
}
#app {
width: 100%;
height: 100vh;
}
.data-card-container {
display: flex;
flex-direction: column;
height: 100vh;
background: #fafafa;
}
.data-card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 32px;
height: 56px;
background: #fff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.header-left {
display: flex;
align-items: center;
gap: 16px;
}
.back-btn {
padding: 8px 12px;
font-size: 14px;
color: #666;
cursor: pointer;
display: flex;
align-items: center;
gap: 4px;
}
.back-btn:hover {
color: #409EFF;
}
.data-card-title {
font-size: 18px;
font-weight: 600;
color: #333;
}
.header-right {
display: flex;
align-items: center;
gap: 12px;
}
.data-card-toolbar {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 32px;
background: #fff;
border-bottom: 1px solid #e8e8e8;
}
.toolbar-group {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar-label {
font-size: 14px;
color: #666;
}
.data-card-content {
flex: 1;
padding: 24px 32px;
overflow: auto;
}
.table-container {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 24px;
display: inline-block;
}
.data-table {
border-collapse: collapse;
table-layout: fixed;
}
.data-table td {
border: 1px solid #ddd;
min-width: 60px;
height: 30px;
position: relative;
cursor: cell;
transition: background-color 0.2s;
}
.data-table td:hover {
background-color: #f5f7fa;
}
.data-table td.selected {
background-color: #ecf5ff;
border-color: #409EFF;
}
.resize-handle-col {
position: absolute;
right: 0;
top: 0;
width: 5px;
height: 100%;
cursor: col-resize;
background: transparent;
z-index: 10;
}
.resize-handle-col:hover {
background: #409EFF;
}
.resize-handle-row {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 5px;
cursor: row-resize;
background: transparent;
z-index: 10;
}
.resize-handle-row:hover {
background: #409EFF;
}
.cell-input {
width: 100%;
height: 100%;
border: none;
outline: none;
padding: 4px 8px;
font-size: 14px;
background: transparent;
}
.color-picker-panel {
display: flex;
flex-wrap: wrap;
gap: 4px;
width: 180px;
}
.color-option {
width: 24px;
height: 24px;
border-radius: 4px;
cursor: pointer;
border: 2px solid transparent;
}
.color-option:hover {
border-color: #409EFF;
}
.color-option.selected {
border-color: #409EFF;
}
</style>
</head>
<body>
<div id="app">
<div class="data-card-container">
<div class="data-card-header">
<div class="header-left">
<div class="back-btn" @click="goBack">
<i class="el-icon-arrow-left"></i>
返回
</div>
<div class="data-card-title">数据卡</div>
</div>
<div class="header-right">
<el-button type="primary" size="small" @click="exportImage">
<i class="el-icon-picture-outline"></i>
导出图片
</el-button>
</div>
</div>
<div class="data-card-toolbar">
<div class="toolbar-group">
<span class="toolbar-label">行数:</span>
<el-input-number v-model="rows" :min="1" :max="50" size="small" @change="updateTableSize"></el-input-number>
</div>
<div class="toolbar-group">
<span class="toolbar-label">列数:</span>
<el-input-number v-model="cols" :min="1" :max="20" size="small" @change="updateTableSize"></el-input-number>
</div>
<el-divider direction="vertical"></el-divider>
<div class="toolbar-group">
<span class="toolbar-label">单元格背景色:</span>
<el-popover
placement="bottom"
width="200"
trigger="click"
v-model="colorPopoverVisible">
<div class="color-picker-panel">
<div
v-for="color in colors"
:key="color"
class="color-option"
:style="{ backgroundColor: color }"
:class="{ selected: selectedColor === color }"
@click="selectColor(color)">
</div>
</div>
<el-button slot="reference" size="small">
<span :style="{ display: 'inline-block', width: '16px', height: '16px', backgroundColor: selectedColor, marginRight: '8px', verticalAlign: 'middle', borderRadius: '2px' }"></span>
选择颜色
</el-button>
</el-popover>
</div>
<el-divider direction="vertical"></el-divider>
<div class="toolbar-group">
<el-button size="small" @click="undo">撤回</el-button>
<el-button size="small" @click="mergeCells">合并单元格</el-button>
<el-button type="primary" size="small" @click="saveTable">保存</el-button>
<el-button type="danger" size="small" @click="clearCell">清空选中</el-button>
</div>
</div>
<div class="data-card-content">
<div class="table-container" ref="tableContainer">
<table class="data-table" ref="dataTable">
<tbody>
<tr v-for="(row, rowIndex) in tableData" :key="rowIndex">
<td
v-for="(cell, colIndex) in row"
:key="colIndex"
:class="{ selected: selectedCells.some(c => c.row === rowIndex && c.col === colIndex) }"
:rowspan="getRowspan(rowIndex, colIndex)"
:colspan="getColspan(rowIndex, colIndex)"
:style="getCellStyle(rowIndex, colIndex)"
@click="editCell(rowIndex, colIndex)"
@mousedown="startSelect($event, rowIndex, colIndex)"
@mouseover="continueSelect($event, rowIndex, colIndex)"
@mouseup="endSelect">
<div class="resize-handle-col" @mousedown.stop="startResizeCol($event, colIndex)"></div>
<div class="resize-handle-row" @mousedown.stop="startResizeRow($event, rowIndex)"></div>
<span v-if="!editingCell || editingCell.row !== rowIndex || editingCell.col !== colIndex">{{ cell.content }}</span>
<input
v-else
class="cell-input"
v-model="tableData[rowIndex][colIndex].content"
@blur="finishEditing"
@keyup.enter="finishEditing"
ref="cellInput"
autofocus>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="https://unpkg.com/vue@2.6.12/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
<script>
new Vue({
el: '#app',
data() {
return {
rows: 10,
cols: 8,
tableData: [],
cellWidths: [],
cellHeights: [],
selectedCells: [],
isSelecting: false,
startCell: null,
editingCell: null,
selectedColor: '#ffffff',
colorPopoverVisible: false,
colors: [
'#ffffff', '#f5f7fa', '#e6a23c', '#67c23a', '#409eff',
'#909399', '#f0f9eb', '#fdf6ec', '#ecf5ff', '#f4f4f5',
'#ff6b6b', '#51cf66', '#339af0', '#cc5de8', '#ff922b',
'#ffd43b', '#20c997', '#22b8cf', '#748ffc', '#be4bdb'
],
resizingCol: null,
resizingRow: null,
startX: 0,
startY: 0,
startWidth: 0,
startHeight: 0,
mergedCells: [],
history: [],
historyIndex: -1
};
},
mounted() {
this.loadTable();
if (this.tableData.length === 0) {
this.generateTable();
// 初始化历史记录
this.saveState();
}
document.addEventListener('mouseup', this.endSelect);
document.addEventListener('mousemove', this.handleResize);
document.addEventListener('mouseup', this.endResize);
},
beforeDestroy() {
document.removeEventListener('mouseup', this.endSelect);
document.removeEventListener('mousemove', this.handleResize);
document.removeEventListener('mouseup', this.endResize);
},
methods: {
goBack() {
window.close();
},
generateTable() {
this.tableData = [];
this.cellWidths = [];
this.cellHeights = [];
this.mergedCells = [];
for (let i = 0; i < this.rows; i++) {
const row = [];
for (let j = 0; j < this.cols; j++) {
row.push({ content: '', bgColor: '#ffffff' });
}
this.tableData.push(row);
this.cellHeights.push(30);
}
for (let j = 0; j < this.cols; j++) {
this.cellWidths.push(100);
}
this.selectedCells = [];
// 重置历史记录
this.history = [];
this.historyIndex = -1;
},
updateTableSize() {
const oldRows = this.tableData.length;
const oldCols = oldRows > 0 ? this.tableData[0].length : 0;
if (this.rows !== oldRows || this.cols !== oldCols) {
// 保存当前状态
this.saveState();
// 处理行的增减
if (this.rows > oldRows) {
// 增加行
for (let i = oldRows; i < this.rows; i++) {
const row = [];
for (let j = 0; j < this.cols; j++) {
row.push({ content: '', bgColor: '#ffffff' });
}
this.tableData.push(row);
this.cellHeights.push(30);
}
} else if (this.rows < oldRows) {
// 减少行
this.tableData.splice(this.rows);
this.cellHeights.splice(this.rows);
}
// 处理列的增减
if (this.cols > oldCols) {
// 增加列
for (let i = 0; i < this.tableData.length; i++) {
for (let j = oldCols; j < this.cols; j++) {
this.tableData[i].push({ content: '', bgColor: '#ffffff' });
}
}
for (let j = oldCols; j < this.cols; j++) {
this.cellWidths.push(100);
}
} else if (this.cols < oldCols) {
// 减少列
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].splice(this.cols);
}
this.cellWidths.splice(this.cols);
}
}
},
mergeCells() {
if (this.selectedCells.length < 2) {
this.$message.warning('请至少选择两个单元格进行合并');
return;
}
// 保存当前状态
this.saveState();
// 计算合并区域的最小和最大行、列
const minRow = Math.min(...this.selectedCells.map(c => c.row));
const maxRow = Math.max(...this.selectedCells.map(c => c.row));
const minCol = Math.min(...this.selectedCells.map(c => c.col));
const maxCol = Math.max(...this.selectedCells.map(c => c.col));
// 获取左上角单元格的内容和背景色
const firstCell = this.tableData[minRow][minCol];
const content = firstCell.content;
const bgColor = firstCell.bgColor;
// 清除其他单元格的内容和背景色
for (let r = minRow; r <= maxRow; r++) {
for (let c = minCol; c <= maxCol; c++) {
if (r !== minRow || c !== minCol) {
this.tableData[r][c].content = '';
this.tableData[r][c].bgColor = '#ffffff';
}
}
}
// 记录合并信息
this.mergedCells.push({
startRow: minRow,
startCol: minCol,
endRow: maxRow,
endCol: maxCol
});
this.$message.success('单元格合并成功');
},
saveTable() {
const tableData = {
rows: this.rows,
cols: this.cols,
tableData: this.tableData,
cellWidths: this.cellWidths,
cellHeights: this.cellHeights,
mergedCells: this.mergedCells
};
localStorage.setItem('dataCardTable', JSON.stringify(tableData));
this.$message.success('表格保存成功!');
},
loadTable() {
const savedData = localStorage.getItem('dataCardTable');
if (savedData) {
try {
const data = JSON.parse(savedData);
this.rows = data.rows;
this.cols = data.cols;
this.tableData = data.tableData;
this.cellWidths = data.cellWidths;
this.cellHeights = data.cellHeights;
this.mergedCells = data.mergedCells || [];
this.$message.success('表格加载成功!');
// 初始化历史记录
this.saveState();
} catch (e) {
console.error('加载表格失败:', e);
}
}
},
saveState() {
// 保存当前状态到历史记录
const state = {
rows: this.rows,
cols: this.cols,
tableData: JSON.parse(JSON.stringify(this.tableData)),
cellWidths: [...this.cellWidths],
cellHeights: [...this.cellHeights],
mergedCells: JSON.parse(JSON.stringify(this.mergedCells))
};
// 如果当前不是在历史记录的最后,删除后面的历史记录
if (this.historyIndex < this.history.length - 1) {
this.history = this.history.slice(0, this.historyIndex + 1);
}
// 添加新状态到历史记录
this.history.push(state);
// 限制历史记录长度,防止内存占用过大
if (this.history.length > 50) {
this.history.shift();
// 调整历史记录索引
if (this.historyIndex > 0) {
this.historyIndex--;
}
} else {
this.historyIndex++;
}
},
undo() {
if (this.historyIndex > 0) {
this.historyIndex--;
const state = this.history[this.historyIndex];
this.rows = state.rows;
this.cols = state.cols;
this.tableData = state.tableData;
this.cellWidths = state.cellWidths;
this.cellHeights = state.cellHeights;
this.mergedCells = state.mergedCells;
this.$message.success('操作已撤回');
} else {
this.$message.info('没有可撤回的操作');
}
},
startSelect(event, row, col) {
if (event.button !== 0) return;
// 只有在按下鼠标并移动时才开始选择
this.isSelecting = true;
this.startCell = { row, col };
this.selectedCells = [{ row, col }];
},
continueSelect(event, row, col) {
if (!this.isSelecting || !this.startCell) return;
const minRow = Math.min(this.startCell.row, row);
const maxRow = Math.max(this.startCell.row, row);
const minCol = Math.min(this.startCell.col, col);
const maxCol = Math.max(this.startCell.col, col);
this.selectedCells = [];
for (let r = minRow; r <= maxRow; r++) {
for (let c = minCol; c <= maxCol; c++) {
this.selectedCells.push({ row: r, col: c });
}
}
},
endSelect() {
this.isSelecting = false;
},
editCell(row, col) {
// 停止任何正在进行的选择
this.isSelecting = false;
this.selectedCells = [{ row, col }];
// 进入编辑模式
this.editingCell = { row, col };
this.$nextTick(() => {
const cellInputs = this.$refs.cellInput;
if (cellInputs) {
// 确保输入框获得焦点
if (Array.isArray(cellInputs)) {
cellInputs.forEach(input => {
if (input) input.focus();
});
} else if (cellInputs) {
cellInputs.focus();
}
}
});
},
finishEditing() {
// 保存当前状态
this.saveState();
this.editingCell = null;
},
selectColor(color) {
if (this.selectedCells.length === 0) return;
// 保存当前状态
this.saveState();
this.selectedColor = color;
this.colorPopoverVisible = false;
this.selectedCells.forEach(cell => {
this.tableData[cell.row][cell.col].bgColor = color;
});
},
clearCell() {
if (this.selectedCells.length === 0) return;
// 保存当前状态
this.saveState();
this.selectedCells.forEach(cell => {
this.tableData[cell.row][cell.col].content = '';
this.tableData[cell.row][cell.col].bgColor = '#ffffff';
});
},
startResizeCol(event, col) {
this.resizingCol = col;
this.startX = event.clientX;
this.startWidth = this.cellWidths[col];
},
startResizeRow(event, row) {
this.resizingRow = row;
this.startY = event.clientY;
this.startHeight = this.cellHeights[row];
},
handleResize(event) {
if (this.resizingCol !== null) {
const deltaX = event.clientX - this.startX;
const newWidth = Math.max(60, this.startWidth + deltaX);
this.$set(this.cellWidths, this.resizingCol, newWidth);
}
if (this.resizingRow !== null) {
const deltaY = event.clientY - this.startY;
const newHeight = Math.max(30, this.startHeight + deltaY);
this.$set(this.cellHeights, this.resizingRow, newHeight);
}
},
endResize() {
this.resizingCol = null;
this.resizingRow = null;
},
getRowspan(row, col) {
// 检查当前单元格是否是合并单元格的起始单元格
const mergedCell = this.mergedCells.find(mc => mc.startRow === row && mc.startCol === col);
return mergedCell ? mergedCell.endRow - mergedCell.startRow + 1 : 1;
},
getColspan(row, col) {
// 检查当前单元格是否是合并单元格的起始单元格
const mergedCell = this.mergedCells.find(mc => mc.startRow === row && mc.startCol === col);
return mergedCell ? mergedCell.endCol - mergedCell.startCol + 1 : 1;
},
getCellStyle(row, col) {
// 检查当前单元格是否是合并单元格的一部分
const mergedCell = this.mergedCells.find(mc =>
row >= mc.startRow && row <= mc.endRow &&
col >= mc.startCol && col <= mc.endCol
);
// 如果是合并单元格的非起始单元格,隐藏它
if (mergedCell && (row !== mergedCell.startRow || col !== mergedCell.startCol)) {
return {
display: 'none',
width: this.cellWidths[col] + 'px',
height: this.cellHeights[row] + 'px'
};
}
// 正常单元格的样式
return {
width: this.cellWidths[col] + 'px',
height: this.cellHeights[row] + 'px',
backgroundColor: this.tableData[row][col].bgColor || '#fff'
};
},
exportImage() {
const container = this.$refs.tableContainer;
html2canvas(container, {
backgroundColor: '#ffffff',
scale: 2,
useCORS: true
}).then(canvas => {
const link = document.createElement('a');
link.download = '数据卡.png';
link.href = canvas.toDataURL('image/png');
link.click();
this.$message.success('图片导出成功!');
}).catch(err => {
this.$message.error('图片导出失败:' + err.message);
});
}
}
});
</script>
</body>
</html>

BIN
ruoyi-ui/public/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
ruoyi-ui/public/logo2.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

228
ruoyi-ui/public/stepEditor.html

@ -36,7 +36,6 @@
padding: 0 32px;
height: 56px;
background: #fff;
border-bottom: 1px solid #e8e8e8;
}
.header-left {
@ -45,9 +44,14 @@
gap: 16px;
}
.header-right {
display: flex;
gap: 12px;
}
.back-btn {
padding: 8px 12px;
font-size: 14px;
font-size: 16px;
color: #666;
}
@ -56,14 +60,20 @@
}
.step-title {
font-size: 16px;
font-weight: 500;
font-size: 18px;
font-weight: bold;
color: #333;
}
.save-btn {
padding: 8px 24px;
font-size: 14px;
font-size: 16px;
border-radius: 4px;
}
.export-btn {
padding: 8px 24px;
font-size: 16px;
border-radius: 4px;
}
@ -201,6 +211,10 @@
<i class="el-icon-check"></i>
保存
</el-button>
<el-button type="success" @click="exportContent" class="export-btn">
<i class="el-icon-download"></i>
导出
</el-button>
</div>
</div>
@ -596,6 +610,88 @@
localStorage.setItem('stepEditorContent', JSON.stringify(savedData))
this.$message.success('保存成功')
},
async exportContent() {
this.content = this.$refs.editor.innerHTML
let contentWithBase64 = this.content
try {
const base64 = await this.imageToBase64('./logo2.jpg')
contentWithBase64 = this.content.replace(/<img src="\.\/logo2\.jpg"[^>]*>/g,
`<img src="${base64}" style="height: 50px; width: auto;">`)
} catch (e) {
console.log('Logo conversion skipped:', e)
}
const completeHtml = `
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${this.stepTitle}</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h1 {
font-size: 32px;
font-weight: bold;
margin: 20px 0;
text-align: center;
}
h2 {
font-size: 24px;
font-weight: bold;
margin: 20px 0;
}
p {
margin: 10px 0;
}
.editor-content {
margin-top: 20px;
}
</style>
</head>
<body>
<div class="editor-content">
${contentWithBase64}
</div>
</body>
</html>
`
const blob = new Blob([completeHtml], { type: 'text/html;charset=utf-8' })
const url = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = `${this.stepTitle}_${new Date().toLocaleString().replace(/[/:]/g, '-')}.html`
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
URL.revokeObjectURL(url)
this.$message.success('导出成功')
},
imageToBase64(url) {
return new Promise((resolve, reject) => {
const img = new Image()
img.crossOrigin = 'Anonymous'
img.onload = () => {
const canvas = document.createElement('canvas')
canvas.width = img.width
canvas.height = img.height
const ctx = canvas.getContext('2d')
ctx.drawImage(img, 0, 0)
resolve(canvas.toDataURL('image/jpeg'))
}
img.onerror = reject
img.src = url
})
},
loadSavedContent() {
const savedData = JSON.parse(localStorage.getItem('stepEditorContent') || '{}')
const stepData = savedData[`step_${this.stepIndex}`]
@ -605,7 +701,129 @@
this.content = stepData.content
this.updateWordCount()
})
} else {
this.setDefaultContent()
}
},
setDefaultContent() {
this.$nextTick(() => {
if (this.stepIndex === 0) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">点名</h1>
<div></div>
</div>
<div style="display: flex; justify-content: center; gap: 580px; margin-top: 30px; text-align: center;">
<div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
</div>
<div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
</div>
<div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
</div>
</div>
`
} else if (this.stepIndex === 1) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">集体协同</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">任务主要目标、次要目标及风险等级</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">主要目标:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">次要目标:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">风险等级:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else if (this.stepIndex === 2) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">战术规划</h1>
<div></div>
</div>
<h2 style="font-size: 24px; font-weight: bold; margin: 20px 0;">整体战术:</h2>
`
} else if (this.stepIndex === 3) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">资源准备</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">资源准备、风险识别及应对措施</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">资源准备:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">风险识别:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">应对措施:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else if (this.stepIndex === 4) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">指挥演练</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">任务分工、时间节点及实时监控</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">任务分工:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">时间节点:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">实时监控:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else if (this.stepIndex === 5) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">总结评估</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">任务完成情况、效果评估及总结改进</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">完成情况:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">效果评估:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">总结改进:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else {
this.$refs.editor.innerHTML = ''
}
this.content = this.$refs.editor.innerHTML
this.updateWordCount()
})
}
}
})

1
ruoyi-ui/src/assets/icons/svg/shujukapian.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1772159974776" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1624" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M880.96 64h-579.84c-43.648 0-79.04 35.392-79.04 79.04v105.408a79.04 79.04 0 0 0-79.04 79.04v105.408h-26.368A52.736 52.736 0 0 0 64 485.632v421.696c0 29.056 23.616 52.672 52.672 52.672h632.512a52.672 52.672 0 0 0 52.736-52.672v-131.84c43.648 0 79.04-35.328 79.04-79.04V591.104A79.04 79.04 0 0 0 960 512V143.04A79.04 79.04 0 0 0 880.96 64zM116.672 485.632h632.512v112.576H116.672V485.632z m0 421.696V650.88h632.512v256.448H116.672z m711.488-210.816a26.368 26.368 0 0 1-26.304 26.304V485.632a52.736 52.736 0 0 0-52.672-52.736H195.776V327.488c0-14.528 11.776-26.304 26.304-26.304h579.84c14.528 0 26.304 11.776 26.368 26.304v369.024h-0.128zM907.328 512a26.368 26.368 0 0 1-26.368 26.368V327.488c0-43.648-35.328-79.04-78.976-79.04H274.88V143.104c0-14.592 11.776-26.368 26.304-26.368h579.712c14.592 0 26.432 11.776 26.432 26.368V512h-0.064z" fill="#000000" p-id="1625"></path><path d="M448 768a32 32 0 1 0 64 0 32 32 0 0 0-64 0z m96 0a32 32 0 1 0 64 0 32 32 0 0 0-64 0z m96 0a32 32 0 1 0 64 0 32 32 0 0 0-64 0z" fill="#000000" p-id="1626"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

4
ruoyi-ui/src/views/childRoom/index.vue

@ -506,6 +506,7 @@ export default {
{ id: 'modify', name: '测距', icon: 'cj' },
{ id: 'refresh', name: '截图', icon: 'screenshot', action: 'refresh' },
{ id: 'basemap', name: '底图', icon: 'dt' },
{ id: 'datacard', name: '数据卡', icon: 'shujukapian' },
{ id: 'save', name: '保存', icon: 'el-icon-document-checked' },
{ id: 'import', name: '导入', icon: 'el-icon-upload2' },
{ id: 'export', name: '导出', icon: 'el-icon-download' }
@ -1960,6 +1961,9 @@ export default {
//
this.drawDom = false;
this.airspaceDrawDom = false;
} else if (item.id === 'datacard') {
//
window.open('/dataCard.html', '_blank');
} else {
//
this.isRightPanelHidden = true;

Loading…
Cancel
Save