Browse Source

修改模板

master
xiaobai 3 years ago
parent
commit
52a5cabb6d
  1. 39
      src/components/drawerDialog/index.vue
  2. 4
      src/views/archive/archive_scan.vue
  3. 8
      src/views/archive/list.vue
  4. 16
      src/views/flow/template.vue

39
src/components/drawerDialog/index.vue

@ -10,7 +10,7 @@
<template slot="title" width="100%">
<el-col :span="12">
编辑模板
<el-tag>
<el-tag v-if="index">
{{ formTemplate.tempName }}
</el-tag>
</el-col>
@ -649,13 +649,31 @@ export default {
parentList: {
type: Array,
default: () => []
},
type: {
type: Number,
default: 0
}
},
data() {
return {
activeName: 0,
settingList: [],
formTemplate: {},
formTemplate: {
tempName: '',
tempCategory: '',
bglx: '',
jianyanleibie: '',
shebeizhongleidaima: '',
shebeileibiedaima: '',
tempPath: '',
jianyanyiju: '',
withDicCode: '',
parentId: '',
version: '',
sort: '',
cleanState: ''
},
templateSettingId: '',
dialogVisible1: false,
formLabelAlign: {
@ -771,7 +789,9 @@ export default {
this.form.templateId = this.id
this.formLabelAlign.templateId = this.id
this.getList()
if (this.id) {
this.loadFormData(this.index)
}
this.getSbList(undefined, undefined, 1)
this.getBglxList()
this.getJylbList()
@ -1018,7 +1038,7 @@ export default {
},
getCategoryList(type, parentCode, species) {
this.api({
url: '/category/getCategoryList',
url: '/category/all',
method: 'get',
params: {
parentCode: parentCode,
@ -1056,9 +1076,20 @@ export default {
)
},
update() {
let methods = ''
if (this.id) {
if (this.type === 1) {
delete this.formTemplate.id
methods = 'post'
} else {
methods = 'put'
}
} else {
methods = 'post'
}
this.api({
url: '/template',
method: 'put',
method: methods,
data: this.formTemplate
}).then(_ => {
this.$emit('closeTemplateDrawer')

4
src/views/archive/archive_scan.vue

@ -90,8 +90,8 @@ export default {
this.$nextTick(() => {
this.jianyijiahao = this.frameNums
if (this.isAppend) {
this.server({
url: '/archive/archive/getArchiveInfo/' + this.id,
this.api({
url: '/archive/getArchiveInfo/' + this.id,
method: 'get'
}).then(data => {
this.archive = data.archive

8
src/views/archive/list.vue

@ -110,8 +110,8 @@ export default {
},
methods: {
getList() {
this.server({
url: '/archive/archive/archiveList',
this.api({
url: '/archive/list',
method: 'get',
params: this.listQuery
}).then(data => {
@ -134,8 +134,8 @@ export default {
},
//
getFrameNums() {
this.server({
url: '/archive/archive/listFrameNums',
this.api({
url: '/archive/listFrameNums',
method: 'get'
}).then((response) => {
this.jianyijiahao = response

16
src/views/flow/template.vue

@ -178,7 +178,7 @@
size="mini"
circle
title="复制"
@click="copyTemplate(scope.$index)"
@click="copyTemplate(scope.row,scope.$index)"
>
<svg-icon icon-class="clipboard" />
</el-button>
@ -235,7 +235,7 @@
</el-button>
</div>
</el-dialog>
<drawerDialog :id="id" :drawer.sync="drawer" :index="templateIndex" :template-list="list" :parent-list="parentList" @closeTemplateDrawer="closeTemplateDrawer" />
<drawerDialog :id="id" :drawer.sync="drawer" :type="temType" :index="templateIndex" :template-list="list" :parent-list="parentList" @closeTemplateDrawer="closeTemplateDrawer" />
</div>
</template>
<script>
@ -269,6 +269,7 @@ export default {
nblbList: [],
bglxList: [],
dicCodeList: [],
temType: '',
categoryList: [
{
value: 'YSJL',
@ -496,13 +497,16 @@ export default {
showPageStatus: false,
hasCheckedPage: false
}
this.templateIndex = ''
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.drawer = true
},
copyTemplate($index) {
this.loadFormData($index)
copyTemplate(row, $index) {
this.id = row.id
this.temType = 1
this.templateIndex = $index
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.drawer = true
},
showUpdate(row, $index) {
console.log(row, $index, '行')

Loading…
Cancel
Save