|
@ -4,7 +4,7 @@ |
|
|
title="编辑模板" |
|
|
title="编辑模板" |
|
|
:visible.sync="drawer" |
|
|
:visible.sync="drawer" |
|
|
size="90%" |
|
|
size="90%" |
|
|
show- |
|
|
:before-close="(done) => { $emit('closeTemplateDrawer') }" |
|
|
@open="open" |
|
|
@open="open" |
|
|
> |
|
|
> |
|
|
<div class="root"> |
|
|
<div class="root"> |
|
@ -112,6 +112,8 @@ |
|
|
v-model="sbpzLevelStatus" |
|
|
v-model="sbpzLevelStatus" |
|
|
active-color="#13ce66" |
|
|
active-color="#13ce66" |
|
|
inactive-color="#ff4949" |
|
|
inactive-color="#ff4949" |
|
|
|
|
|
active-text="类别品种" |
|
|
|
|
|
inactive-text="所有品种" |
|
|
@change="getSbpzList" |
|
|
@change="getSbpzList" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -198,7 +200,7 @@ |
|
|
<el-button type="primary" @click="update"> |
|
|
<el-button type="primary" @click="update"> |
|
|
保存修改 |
|
|
保存修改 |
|
|
</el-button> |
|
|
</el-button> |
|
|
<el-button @click="drawer = false"> |
|
|
<el-button @click="$emit('closeTemplateDrawer')"> |
|
|
取消 |
|
|
取消 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
@ -207,7 +209,7 @@ |
|
|
<div class="boxRoot"> |
|
|
<div class="boxRoot"> |
|
|
<div class="left"> |
|
|
<div class="left"> |
|
|
<div class="funbox"> |
|
|
<div class="funbox"> |
|
|
<p>模板详情</p> |
|
|
<span>模板详情</span> |
|
|
<el-button |
|
|
<el-button |
|
|
type="primary" |
|
|
type="primary" |
|
|
icon="el-icon-plus" |
|
|
icon="el-icon-plus" |
|
@ -225,33 +227,60 @@ |
|
|
highlight-current-row |
|
|
highlight-current-row |
|
|
@current-change="rowClick" |
|
|
@current-change="rowClick" |
|
|
> |
|
|
> |
|
|
<el-table-column align="center" label="序号" width="50"> |
|
|
<el-table-column align="center" label="序号" width="50" type="index" /> |
|
|
|
|
|
<el-table-column align="center" label="检验项目索引" prop="sort" /> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="表格索引" |
|
|
|
|
|
prop="tableIndex" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="表格模式" |
|
|
|
|
|
width="150" |
|
|
|
|
|
prop="tableMode" |
|
|
|
|
|
> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-text="getIndex(scope.$index)" /> |
|
|
<div> |
|
|
|
|
|
{{ scope.row.tableMode === 1 ? "DN模式" : "KV模式" }} |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
align="center" |
|
|
align="center" |
|
|
label="检验项目行个数" |
|
|
label="写入模式" |
|
|
prop="affiliatedTableRowCount" |
|
|
width="150" |
|
|
|
|
|
prop="writeMode" |
|
|
|
|
|
> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
{{ scope.row.writeMode && writeModes[scope.row.writeMode - 1] }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="首页检验项目起始页码" |
|
|
|
|
|
prop="tableStartRow" |
|
|
width="100" |
|
|
width="100" |
|
|
/> |
|
|
/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
align="center" |
|
|
align="center" |
|
|
label="检验项目起始页码" |
|
|
label="首页检验项目行个数" |
|
|
prop="tableStartRow" |
|
|
prop="tableRowCount" |
|
|
width="100" |
|
|
width="100" |
|
|
/> |
|
|
/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
align="center" |
|
|
align="center" |
|
|
label="检验项目起始行" |
|
|
label="附页检验项目起始行" |
|
|
prop="affiliatedTableStartRow" |
|
|
prop="affiliatedTableStartRow" |
|
|
width="100" |
|
|
width="100" |
|
|
/> |
|
|
/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
align="left" |
|
|
align="center" |
|
|
label="表格索引" |
|
|
label="附页检验项目行个数" |
|
|
prop="tableIndex" |
|
|
prop="affiliatedTableRowCount" |
|
|
|
|
|
width="100" |
|
|
/> |
|
|
/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
:formatter="fmBglx" |
|
|
:formatter="fmBglx" |
|
@ -262,7 +291,7 @@ |
|
|
> |
|
|
> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div> |
|
|
<div> |
|
|
{{ scope.row.tableType == 1 ? "检验项目" : "目录页" }} |
|
|
{{ scope.row.tableType === 1 ? "检验项目" : "目录页" }} |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -277,19 +306,6 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="表格模式" |
|
|
|
|
|
width="150" |
|
|
|
|
|
prop="tableMode" |
|
|
|
|
|
> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
{{ scope.row.tableMode == 1 ? "DN模式" : "KV模式" }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column align="center" label="排序" prop="sort" /> |
|
|
|
|
|
<el-table-column |
|
|
<el-table-column |
|
|
align="center" |
|
|
align="center" |
|
|
label="操作" |
|
|
label="操作" |
|
@ -310,7 +326,7 @@ |
|
|
size="mini" |
|
|
size="mini" |
|
|
icon="el-icon-delete" |
|
|
icon="el-icon-delete" |
|
|
circle |
|
|
circle |
|
|
title="编辑" |
|
|
title="删除" |
|
|
@click="deleteModelFn(scope.row)" |
|
|
@click="deleteModelFn(scope.row)" |
|
|
/> |
|
|
/> |
|
|
</template> |
|
|
</template> |
|
@ -328,7 +344,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="right"> |
|
|
<div class="right"> |
|
|
<div class="funbox"> |
|
|
<div class="funbox"> |
|
|
<p>模板详情</p> |
|
|
<span>模板详情</span> |
|
|
<el-button |
|
|
<el-button |
|
|
type="primary" |
|
|
type="primary" |
|
|
icon="el-icon-plus" |
|
|
icon="el-icon-plus" |
|
@ -399,23 +415,32 @@ |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
|
</div> |
|
|
</div> |
|
|
</el-drawer> |
|
|
</el-drawer> |
|
|
<el-dialog title="新增" :visible.sync="dialogVisible" width="30%"> |
|
|
<el-dialog title="新增" :visible.sync="dialogVisible" width="37%"> |
|
|
<el-form label-width="80px" :model="formLabelAlign"> |
|
|
<el-form ref="templateJyxmForm" label-width="120px" :model="formLabelAlign"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="列名称" |
|
|
label="列对应的字段" |
|
|
:rules="[{ required: true, message: '请输入列名', trigger: 'blur' }]" |
|
|
prop="field" |
|
|
|
|
|
:rules="[{ required: true, message: '请输入字段名', trigger: 'blur' }]" |
|
|
> |
|
|
> |
|
|
<el-input v-model="formLabelAlign.field" /> |
|
|
<el-input v-model="formLabelAlign.field" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="排序" |
|
|
label="从右往左数对应的索引" |
|
|
|
|
|
label-width="170px" |
|
|
|
|
|
prod="indexFromRight" |
|
|
:rules="[ |
|
|
:rules="[ |
|
|
{ required: true, message: '请输入排序', trigger: 'blur' }, |
|
|
{ required: true, message: '请输入对应索引', trigger: 'blur' }, |
|
|
]" |
|
|
]" |
|
|
> |
|
|
> |
|
|
<el-input-number v-model="formLabelAlign.indexFromRight" :min="1" :max="10" label="索引" /> |
|
|
<el-input-number v-model="formLabelAlign.indexFromRight" :min="1" :max="10" label="索引" /> |
|
|
|
|
|
<el-alert |
|
|
|
|
|
type="warning" |
|
|
|
|
|
title="从1开始数" |
|
|
|
|
|
style="display: inline" |
|
|
|
|
|
:closable="false" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="模式"> |
|
|
<el-form-item label="字段模式" prop="fieldMode"> |
|
|
<el-radio-group v-model="formLabelAlign.fieldMode"> |
|
|
<el-radio-group v-model="formLabelAlign.fieldMode"> |
|
|
<el-radio :label="0"> |
|
|
<el-radio :label="0"> |
|
|
普通模式 |
|
|
普通模式 |
|
@ -434,97 +459,155 @@ |
|
|
<el-button type="primary" @click="onsubmit">确 定</el-button> |
|
|
<el-button type="primary" @click="onsubmit">确 定</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<el-dialog title="新增" :visible.sync="dialogVisible1" width="50%"> |
|
|
<el-dialog title="新增" :visible.sync="dialogVisible1" width="50%" @close="close"> |
|
|
<el-form> |
|
|
<el-form ref="templateSettingForm" :model="form"> |
|
|
|
|
|
<el-form-item label="检验项目索引" prop="sort" label-width="150px"> |
|
|
|
|
|
<el-input-number v-model="form.sort" :min="0" :max="100" /> |
|
|
|
|
|
<el-alert |
|
|
|
|
|
type="warning" |
|
|
|
|
|
title="从1开始数" |
|
|
|
|
|
style="display: inline" |
|
|
|
|
|
:closable="false" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="检验项目行个数" |
|
|
label="表格模式" |
|
|
prop="tableRowCount" |
|
|
prop="tableMode" |
|
|
|
|
|
label-width="150px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-radio-group v-model="form.tableMode" @change="changeTableMode"> |
|
|
|
|
|
<el-radio :label="1"> |
|
|
|
|
|
DN模式 |
|
|
|
|
|
</el-radio> |
|
|
|
|
|
<el-radio :label="2"> |
|
|
|
|
|
KV模式 |
|
|
|
|
|
</el-radio> |
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="写入模式" |
|
|
|
|
|
prop="writeMode" |
|
|
|
|
|
label-width="150px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-radio-group v-model="form.writeMode" @change="changeWriteMode"> |
|
|
|
|
|
<el-radio v-for="(item, writeModeIndex) in writeModes" :key="writeModeIndex" :label="writeModeIndex + 1" :disabled="form.tableMode === 2"> |
|
|
|
|
|
{{ item }} |
|
|
|
|
|
</el-radio> |
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="表格索引" |
|
|
|
|
|
prop="tableIndex" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
> |
|
|
> |
|
|
<el-input-number |
|
|
<el-input-number |
|
|
v-model="form.affiliatedTableRowCount" |
|
|
v-model="form.tableIndex" |
|
|
:min="0" |
|
|
:min="0" |
|
|
:max="100" |
|
|
:max="100" |
|
|
|
|
|
:disabled="form.tableMode === 2" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-alert |
|
|
|
|
|
type="warning" |
|
|
|
|
|
title="从1开始数" |
|
|
|
|
|
style="display: inline" |
|
|
|
|
|
:closable="false" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="检验项目起始行" |
|
|
label="首页检验项目起始行" |
|
|
prop="affiliatedTableStartRow" |
|
|
prop="tableStartRow" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
> |
|
|
> |
|
|
<el-input-number |
|
|
<el-input-number |
|
|
v-model="form.affiliatedTableStartRow" |
|
|
v-model="form.tableStartRow" |
|
|
:min="0" |
|
|
:min="0" |
|
|
:max="100" |
|
|
:max="100" |
|
|
|
|
|
:disabled="form.tableMode === 2" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-alert |
|
|
|
|
|
type="warning" |
|
|
|
|
|
title="从1开始数" |
|
|
|
|
|
style="display: inline" |
|
|
|
|
|
:closable="false" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="检验项目起始页码" |
|
|
label="首页检验项目行个数" |
|
|
prop="tableStartRow" |
|
|
prop="tableRowCount" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
> |
|
|
> |
|
|
<el-input-number |
|
|
<el-input-number |
|
|
v-model="form.tableStartRow" |
|
|
v-model="form.tableRowCount" |
|
|
:min="0" |
|
|
:min="0" |
|
|
:max="100" |
|
|
:max="100" |
|
|
|
|
|
:disabled="form.tableMode === 2" |
|
|
/> |
|
|
/> |
|
|
<el-alert |
|
|
<el-alert |
|
|
type="warning" |
|
|
type="warning" |
|
|
title="建议先尝试如果是第1页则为1!" |
|
|
title="从1开始数" |
|
|
style="display: inline" |
|
|
style="display: inline" |
|
|
:closable="false" |
|
|
:closable="false" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="表格索引" |
|
|
label="附页检验项目起始行" |
|
|
prop="tableIndex" |
|
|
prop="affiliatedTableStartRow" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
> |
|
|
> |
|
|
<el-input-number |
|
|
<el-input-number |
|
|
v-model="form.tableIndex" |
|
|
v-model="form.affiliatedTableStartRow" |
|
|
:min="0" |
|
|
:min="0" |
|
|
:max="100" |
|
|
:max="100" |
|
|
|
|
|
:disabled="form.tableMode === 2" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-alert |
|
|
|
|
|
type="warning" |
|
|
|
|
|
title="从1开始数" |
|
|
|
|
|
style="display: inline" |
|
|
|
|
|
:closable="false" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="排序" prop="sort" label-width="150px"> |
|
|
<el-form-item |
|
|
<el-input-number v-model="form.sort" :min="0" :max="100" /> |
|
|
label="附页检验项目行个数" |
|
|
|
|
|
prop="affiliatedTableRowCount" |
|
|
|
|
|
label-width="150px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input-number |
|
|
|
|
|
v-model="form.affiliatedTableRowCount" |
|
|
|
|
|
:min="0" |
|
|
|
|
|
:max="100" |
|
|
|
|
|
:disabled="form.tableMode === 2" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-alert |
|
|
|
|
|
type="warning" |
|
|
|
|
|
title="从1开始数" |
|
|
|
|
|
style="display: inline" |
|
|
|
|
|
:closable="false" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="表格类型" |
|
|
label="表格类型" |
|
|
prop="form.tableType" |
|
|
prop="tableType" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
> |
|
|
> |
|
|
<el-radio v-model="form.tableType" label="1"> |
|
|
<el-radio v-model="form.tableType" :label="1"> |
|
|
检验项目 |
|
|
检验项目 |
|
|
</el-radio> |
|
|
</el-radio> |
|
|
<el-radio v-model="form.tableType" label="2"> |
|
|
<el-radio v-model="form.tableType" :label="2"> |
|
|
目录页 |
|
|
目录页 |
|
|
</el-radio> |
|
|
</el-radio> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="是否是子报告模板" |
|
|
label="是否是子报告模板" |
|
|
prop="isChild" |
|
|
prop="isChild" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
> |
|
|
> |
|
|
<el-switch |
|
|
<el-switch |
|
|
v-model="form.showPageStatus" |
|
|
v-model="form.isChild" |
|
|
active-text="是" |
|
|
active-text="是" |
|
|
inactive-text="不是" |
|
|
inactive-text="不是" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
|
|
|
label="表格类型" |
|
|
|
|
|
prop="form.tableMode" |
|
|
|
|
|
label-width="150px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-radio v-model="form.tableMode" label="1"> |
|
|
|
|
|
DN模式 |
|
|
|
|
|
</el-radio> |
|
|
|
|
|
<el-radio v-model="form.tableMode" label="2"> |
|
|
|
|
|
KV模式 |
|
|
|
|
|
</el-radio> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogVisible1 = false">取 消</el-button> |
|
|
<el-button @click="dialogVisible1 = false">取 消</el-button> |
|
@ -535,7 +618,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import Pagination from '@/components/Pagination' |
|
|
import Pagination from '@/components/Pagination' |
|
|
import { deleteSettingFn, deleteModuleFn } from '@/api/template.js' |
|
|
import TemplateApi from '@/api/template' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { Pagination }, |
|
|
components: { Pagination }, |
|
@ -555,6 +638,10 @@ export default { |
|
|
templateList: { |
|
|
templateList: { |
|
|
type: Array, |
|
|
type: Array, |
|
|
default: () => [] |
|
|
default: () => [] |
|
|
|
|
|
}, |
|
|
|
|
|
parentList: { |
|
|
|
|
|
type: Array, |
|
|
|
|
|
default: () => [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
@ -566,23 +653,23 @@ export default { |
|
|
dialogVisible1: false, |
|
|
dialogVisible1: false, |
|
|
formLabelAlign: { |
|
|
formLabelAlign: { |
|
|
field: '', |
|
|
field: '', |
|
|
fieldMode: '', |
|
|
fieldMode: '1', |
|
|
indexFromRight: '', |
|
|
indexFromRight: '', |
|
|
templateId: '', // 模板id |
|
|
templateId: '', // 模板id |
|
|
templateSettingId: '' // 配置id |
|
|
templateSettingId: '' // 配置id |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
form: { |
|
|
affiliatedTableRowCount: '', |
|
|
|
|
|
affiliatedTableStartRow: '', |
|
|
|
|
|
isChild: '', |
|
|
|
|
|
sort: '', |
|
|
|
|
|
tableIndex: '', |
|
|
|
|
|
tableMode: '', |
|
|
|
|
|
tableRowCount: '', |
|
|
|
|
|
tableStartRow: '', |
|
|
|
|
|
templateId: '', |
|
|
templateId: '', |
|
|
tableType: '1', |
|
|
writeMode: 1, |
|
|
writeMode: '1' |
|
|
tableIndex: 1, |
|
|
|
|
|
tableMode: 1, |
|
|
|
|
|
tableStartRow: 0, |
|
|
|
|
|
tableRowCount: 0, |
|
|
|
|
|
affiliatedTableStartRow: 0, |
|
|
|
|
|
affiliatedTableRowCount: 0, |
|
|
|
|
|
sort: 1, |
|
|
|
|
|
tableType: 1, |
|
|
|
|
|
isChild: false |
|
|
}, |
|
|
}, |
|
|
// formTemplate:{}, |
|
|
// formTemplate:{}, |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
@ -603,7 +690,6 @@ export default { |
|
|
neibuleibie: [], |
|
|
neibuleibie: [], |
|
|
nblbList: [], |
|
|
nblbList: [], |
|
|
dicCodeList: [], |
|
|
dicCodeList: [], |
|
|
parentList: [], |
|
|
|
|
|
options: [], |
|
|
options: [], |
|
|
sbzlList: [], |
|
|
sbzlList: [], |
|
|
shebeipinzhongdaima: [], |
|
|
shebeipinzhongdaima: [], |
|
@ -612,10 +698,7 @@ export default { |
|
|
totalCount: 0, |
|
|
totalCount: 0, |
|
|
listQuery: { |
|
|
listQuery: { |
|
|
pageNum: 1, // 页码 |
|
|
pageNum: 1, // 页码 |
|
|
pageRow: 20, // 每页条数 |
|
|
pageRow: 20 // 每页条数 |
|
|
searchTemplate: { |
|
|
|
|
|
neibuleibie: null |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
list: [], |
|
|
list: [], |
|
|
gridData: [], |
|
|
gridData: [], |
|
@ -628,11 +711,50 @@ export default { |
|
|
templateId: '', |
|
|
templateId: '', |
|
|
templateSettingId: '' |
|
|
templateSettingId: '' |
|
|
}, |
|
|
}, |
|
|
totalCount1: 0 |
|
|
totalCount1: 0, |
|
|
|
|
|
writeModes: ['DN模式', 'KV模式', 'CFI模式', 'SA模式'] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() {}, |
|
|
mounted() {}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
changeTableMode() { |
|
|
|
|
|
switch (this.form.tableMode) { |
|
|
|
|
|
case 1: |
|
|
|
|
|
this.form.writeMode = 1 |
|
|
|
|
|
break |
|
|
|
|
|
case 2: |
|
|
|
|
|
default: |
|
|
|
|
|
this.form.writeMode = 2 |
|
|
|
|
|
this.form.tableIndex = 0 |
|
|
|
|
|
this.form.tableStartRow = 0 |
|
|
|
|
|
this.form.tableRowCount = 0 |
|
|
|
|
|
this.form.affiliatedTableStartRow = 0 |
|
|
|
|
|
this.form.affiliatedTableRowCount = 0 |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
changeWriteMode() { |
|
|
|
|
|
switch (this.form.writeMode) { |
|
|
|
|
|
case 1: |
|
|
|
|
|
case 3: |
|
|
|
|
|
case 4: |
|
|
|
|
|
this.form.tableMode = 1 |
|
|
|
|
|
break |
|
|
|
|
|
case 2: |
|
|
|
|
|
this.form.tableMode = 2 |
|
|
|
|
|
this.form.tableIndex = 0 |
|
|
|
|
|
this.form.tableStartRow = 0 |
|
|
|
|
|
this.form.tableRowCount = 0 |
|
|
|
|
|
this.form.affiliatedTableStartRow = 0 |
|
|
|
|
|
this.form.affiliatedTableRowCount = 0 |
|
|
|
|
|
break |
|
|
|
|
|
default: |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
close() { |
|
|
|
|
|
this.$refs.templateSettingForm.resetFields() |
|
|
|
|
|
}, |
|
|
open() { |
|
|
open() { |
|
|
console.log(this.id, 'hahahh') |
|
|
console.log(this.id, 'hahahh') |
|
|
this.listQuery.templateId = this.id |
|
|
this.listQuery.templateId = this.id |
|
@ -652,19 +774,18 @@ export default { |
|
|
this.dialogVisible1 = true |
|
|
this.dialogVisible1 = true |
|
|
}, |
|
|
}, |
|
|
editFnTem(row) { |
|
|
editFnTem(row) { |
|
|
this.dialogVisible1 = true |
|
|
|
|
|
row.tableType = row.tableType + '' |
|
|
|
|
|
row.tableMode = row.tableMode + '' |
|
|
|
|
|
this.form = row |
|
|
this.form = row |
|
|
|
|
|
this.dialogVisible1 = true |
|
|
}, |
|
|
}, |
|
|
addtemFn() { |
|
|
addtemFn() { |
|
|
|
|
|
this.$refs.templateJyxmForm.resetFields() |
|
|
this.dialogVisible = true |
|
|
this.dialogVisible = true |
|
|
}, |
|
|
}, |
|
|
changeState() {}, |
|
|
changeState() {}, |
|
|
getList() { |
|
|
getList() { |
|
|
// 查询列表 |
|
|
// 查询列表 |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/templateSetting/getList', |
|
|
url: '/templateSetting/list', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: this.listQuery |
|
|
params: this.listQuery |
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
@ -673,15 +794,15 @@ export default { |
|
|
// }) |
|
|
// }) |
|
|
this.list = data.list |
|
|
this.list = data.list |
|
|
this.totalCount = data.total * 1 |
|
|
this.totalCount = data.total * 1 |
|
|
|
|
|
if (data.list[0]) { |
|
|
this.getDemoList(data.list[0].id) |
|
|
this.getDemoList(data.list[0].id) |
|
|
this.templateSettingId = data.list[0].id |
|
|
this.templateSettingId = data.list[0].id |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
deleteModelFn(row) { |
|
|
deleteModelFn(row) { |
|
|
const arr = [] |
|
|
TemplateApi.deleteModuleFn({ |
|
|
arr.push(row.id) |
|
|
ids: [row.id] |
|
|
deleteModuleFn({ |
|
|
|
|
|
id: arr |
|
|
|
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
|
this.getList() |
|
|
this.getList() |
|
|
}) |
|
|
}) |
|
@ -689,17 +810,8 @@ export default { |
|
|
deleteFn(row, index) { |
|
|
deleteFn(row, index) { |
|
|
const arr = [] |
|
|
const arr = [] |
|
|
arr.push(row.id) |
|
|
arr.push(row.id) |
|
|
// this.api({ |
|
|
TemplateApi.deleteSettingFn({ |
|
|
// url: '/templateJyxm', |
|
|
ids: arr |
|
|
// method: 'delete', |
|
|
|
|
|
// params: { |
|
|
|
|
|
// id: arr |
|
|
|
|
|
// } |
|
|
|
|
|
// }).then((data) => { |
|
|
|
|
|
// this.getDemoList() |
|
|
|
|
|
// }) |
|
|
|
|
|
deleteSettingFn({ |
|
|
|
|
|
id: arr |
|
|
|
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
|
this.getDemoList() |
|
|
this.getDemoList() |
|
|
}) |
|
|
}) |
|
@ -713,7 +825,7 @@ export default { |
|
|
this.jyxmParams.templateSettingId = id |
|
|
this.jyxmParams.templateSettingId = id |
|
|
this.jyxmParams.templateId = this.id |
|
|
this.jyxmParams.templateId = this.id |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/templateJyxm/getList', |
|
|
url: '/templateJyxm/list', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: this.jyxmParams |
|
|
params: this.jyxmParams |
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
@ -759,7 +871,7 @@ export default { |
|
|
onsubmit1() { |
|
|
onsubmit1() { |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/templateSetting', |
|
|
url: '/templateSetting', |
|
|
method: 'post', |
|
|
method: this.form.id ? 'put' : 'post', |
|
|
data: this.form |
|
|
data: this.form |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
this.dialogVisible1 = false |
|
|
this.dialogVisible1 = false |
|
@ -939,18 +1051,18 @@ export default { |
|
|
url: '/template', |
|
|
url: '/template', |
|
|
method: 'put', |
|
|
method: 'put', |
|
|
data: this.formTemplate |
|
|
data: this.formTemplate |
|
|
}).then((data) => { |
|
|
}).then(_ => { |
|
|
this.drawer = false |
|
|
this.$emit('closeTemplateDrawer') |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
rowClick(row) { |
|
|
rowClick(row) { |
|
|
console.log(row, '选择') |
|
|
console.log(row, '选择') |
|
|
|
|
|
if (!row) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
this.templateSettingId = row.id |
|
|
this.templateSettingId = row.id |
|
|
this.$refs.settingList.toggleRowSelection(row) |
|
|
this.$refs.settingList.toggleRowSelection(row) |
|
|
this.getDemoList(row.id) |
|
|
this.getDemoList(row.id) |
|
|
}, |
|
|
|
|
|
addFn() { |
|
|
|
|
|
this.dialogVisible1 = true |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|