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. 8
      src/views/dic/category.vue
  5. 16
      src/views/flow/template.vue

39
src/components/drawerDialog/index.vue

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

4
src/views/archive/archive_scan.vue

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

8
src/views/archive/list.vue

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

8
src/views/dic/category.vue

@ -148,7 +148,7 @@ export default {
sbzlList: [], sbzlList: [],
species: [], species: [],
parentList: [], parentList: [],
leftList:[] leftList: []
} }
}, },
created() { created() {
@ -284,13 +284,13 @@ export default {
this.parentList = data this.parentList = data
}) })
}, },
getLeftList(){ getLeftList() {
this.api({ this.api({
url: '/getTopLevel', url: '/getTopLevel',
method: 'get', method: 'get',
params: { params: {
pageNum:10, pageNum: 10,
pageSize:10 pageSize: 10
} }
}).then(data => { }).then(data => {
this.leftList = data this.leftList = data

16
src/views/flow/template.vue

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

Loading…
Cancel
Save