Merge remote-tracking branch 'origin/master'
This commit is contained in:
+3
-3
@@ -4399,10 +4399,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (fileList.size() != 0) {
|
||||
//文件
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
String file = StringUtils.join(fileList, ",") + "字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.pdf,则应填写AAA/B.pdf\n";
|
||||
String file = StringUtils.join(fileList, ",") + "字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件且该文件夹下只能有一层级,假设在AAA标准号下放置了B.pdf,则应填写AAA/B.pdf\n";
|
||||
sbTwo.append(count++ + "." + file);
|
||||
}else{
|
||||
String file = StringUtils.join(fileList, ",") + " When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. Assume that the file is saved in the AAA standard numberB.pdf,Should fill inAAA/B.pdf\n";
|
||||
String file = StringUtils.join(fileList, ",") + " When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder and can be only one level under this folder, Assume that the file is saved in the AAA standard numberB.pdf,Should fill inAAA/B.pdf\n";
|
||||
sbTwo.append(count++ + "." + file);
|
||||
}
|
||||
}
|
||||
@@ -5280,7 +5280,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName,cut,errorMsg,null,key,key);
|
||||
if (nowFileList.size() == 0) {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += key + "压缩包中没有" + fileName + "文件, ";
|
||||
errorMsg += key + " 压缩包中没有" + fileName + "文件, ";
|
||||
}else{
|
||||
errorMsg += key + " Not in the zip package" + fileName + "file, ";
|
||||
}
|
||||
|
||||
+2
-2
@@ -136,8 +136,8 @@ public class FileUnZip {
|
||||
String filenameOne = "";
|
||||
String filenameTwo = "";
|
||||
if(filename.contains("/")){
|
||||
filenameOne = filename.split("/")[0];
|
||||
filenameTwo = filename.split("/")[1];
|
||||
filenameOne = filename.split("/")[1];
|
||||
filenameTwo = filename.split("/")[2];
|
||||
}
|
||||
List<File> resultlist = new ArrayList<>();
|
||||
if (StringUtil.isNotEmpty(path)){
|
||||
|
||||
@@ -554,8 +554,8 @@ module.exports = {
|
||||
newNode: 'New node',
|
||||
modifyNode: 'Modify Node',
|
||||
deleteNode: 'Delete Node',
|
||||
ImplementationDate: 'New Type Execute Date',
|
||||
vehicleInProductionDate: 'New Vehicle Execute Date',
|
||||
ImplementationDate: 'New Type Execution Date',
|
||||
vehicleInProductionDate: 'New Vehicle Execution Date',
|
||||
deleteNodes: 'If there are child nodes under this node, they will be deleted synchronously. Are you sure to delete this data?',
|
||||
leastTwo: 'Please Select at Least two pieces of data',
|
||||
mergeTerms: 'Determine Merger Terms',
|
||||
@@ -937,5 +937,6 @@ module.exports = {
|
||||
documentLibraryDetails: 'Document library details',
|
||||
question:'Question',
|
||||
ConfirmQuestion:'Confirm Question',
|
||||
disableInput:'Disable input',
|
||||
OnlyOrTaskconfirmationOut:'Only when the list confirmation status or task confirmation status is to be confirmed can the reminder be carried out',
|
||||
}
|
||||
@@ -943,4 +943,5 @@ module.exports = {
|
||||
question: '催办',
|
||||
ConfirmQuestion: '确认催办?',
|
||||
OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办',
|
||||
disableInput:'禁止输入',
|
||||
}
|
||||
@@ -1,73 +1,80 @@
|
||||
<template>
|
||||
<div class="dic-list">
|
||||
<div class="dic-list-content">
|
||||
<div class="dic-list-header">
|
||||
<a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-form-item :label="$t('name')+':'">
|
||||
<a-input v-if="dictVal=='tree'" v-model="queryParams.name" :placeholder="$t('enterName')" />
|
||||
<j-input v-if="dictVal=='list'" v-model="queryParams.itemText" :placeholder="$t('enterName')" />
|
||||
<div class="dic-list">
|
||||
<div class="dic-list-content">
|
||||
<div class="dic-list-header">
|
||||
<a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-form-item :label="$t('name')+':'">
|
||||
<a-input v-if="dictVal=='tree'" v-model="queryParams.name" :placeholder="$t('enterName')"/>
|
||||
<j-input v-if="dictVal=='list'" v-model="queryParams.itemText" :placeholder="$t('enterName')"/>
|
||||
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div class="form-btn">
|
||||
<a-button class="form-btn-search" type="primary" @click="search">{{$t('query')}}</a-button>
|
||||
<a-button class="form-btn-reset" @click="reset">{{$t('reset')}}</a-button>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div class="form-btn">
|
||||
<a-button class="form-btn-search" type="primary" @click="search">{{$t('query')}}</a-button>
|
||||
<a-button class="form-btn-reset" @click="reset">{{$t('reset')}}</a-button>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="dicAdd">
|
||||
<a-icon type="plus" />
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
<div class="operator-text" @click="batDelete" v-has="dictVal=='list'?'dictItem:logicDeleteBatch':'sys:category:logicDeleteBatch'">
|
||||
<a-icon type="delete" />
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dic-list-table">
|
||||
<list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict" @deleteDict="deleteDict" :total="total" :queryParams="queryParams" @selected="selectedKeys" @ok="ok"></list-table>
|
||||
<tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record" :queryParams="queryParams" @editDict="editTreeDict" @selectedKeys="selectedKeys" @ok="ok" :total="total" :isPagination="false"></tree-table>
|
||||
</div>
|
||||
<a-modal class="dict-module" v-model="newVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
||||
<a-form-model
|
||||
v-if="newVisible"
|
||||
class="dic-form-module"
|
||||
ref="ruleForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item :label="$t('name')" prop="itemText" v-if="dictVal=='list'">
|
||||
<a-input v-model.trim="form.itemText" :placeholder="$t('enterName')" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('name')" prop="name" v-if="dictVal=='tree'">
|
||||
<a-input v-model.trim="form.name" :placeholder="$t('enterName')" />
|
||||
</a-form-model-item>
|
||||
<!-- <a-form-model-item :label="$t('DataValue')" prop="itemValue">-->
|
||||
<!-- <a-input v-model="form.itemValue" :placeholder="$t('enterDataValue')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<a-form-model-item :label="$t('enName')" prop="enName">
|
||||
<a-input v-model.trim="form.enName" :placeholder="$t('PleaseEnterYourEnglishName')" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('ParentName')" prop="pid" v-if="parentVisible">
|
||||
<a-select v-model="form.pid" @change="handleChange" :placeholder="$t('pleaseSelect')" allowClear>
|
||||
<a-select-option :value="item.id" v-for="(item, index) in parentDataPid" :key="item.id">
|
||||
{{item.name}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('DisplayOrder')" prop="sortOrder">
|
||||
<a-input-number v-model="form.sortOrder" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%" :min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('describe')" prop="description">
|
||||
<a-input v-model.trim="form.description" :placeholder="$t('PleaseEnterDescription')" />
|
||||
</a-form-model-item>
|
||||
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="dicAdd">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
<div class="operator-text" @click="batDelete"
|
||||
v-has="dictVal=='list'?'dictItem:logicDeleteBatch':'sys:category:logicDeleteBatch'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dic-list-table">
|
||||
<list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict"
|
||||
@deleteDict="deleteDict" :total="total" :queryParams="queryParams" @selected="selectedKeys"
|
||||
@ok="ok"></list-table>
|
||||
<tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record"
|
||||
:queryParams="queryParams" @editDict="editTreeDict" @selectedKeys="selectedKeys" @ok="ok"
|
||||
:total="total" :isPagination="false"></tree-table>
|
||||
</div>
|
||||
<a-modal class="dict-module" v-model="newVisible" :title="title" :ok-text="$t('preservation')"
|
||||
:cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
||||
<a-form-model
|
||||
v-if="newVisible"
|
||||
class="dic-form-module"
|
||||
ref="ruleForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item :label="$t('name')" prop="itemText" v-if="dictVal=='list'">
|
||||
<a-input v-model.trim="form.itemText" :placeholder="$t('enterName')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('name')" prop="name" v-if="dictVal=='tree'">
|
||||
<a-input v-model.trim="form.name" :placeholder="$t('enterName')"/>
|
||||
</a-form-model-item>
|
||||
<!-- <a-form-model-item :label="$t('DataValue')" prop="itemValue">-->
|
||||
<!-- <a-input v-model="form.itemValue" :placeholder="$t('enterDataValue')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<a-form-model-item :label="$t('enName')" prop="enName">
|
||||
<a-input v-model.trim="form.enName" :placeholder="$t('PleaseEnterYourEnglishName')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('ParentName')" prop="pid" v-if="parentVisible">
|
||||
<a-select v-model="form.pid" @change="handleChange" :placeholder="$t('pleaseSelect')" allowClear>
|
||||
<a-select-option :value="item.id" v-for="(item, index) in parentDataPid" :key="item.id">
|
||||
{{item.name}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('DisplayOrder')" prop="sortOrder">
|
||||
<a-input-number v-model="form.sortOrder" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%"
|
||||
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('describe')" prop="description">
|
||||
<a-input v-model.trim="form.description" :placeholder="$t('PleaseEnterDescription')"/>
|
||||
</a-form-model-item>
|
||||
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -76,67 +83,71 @@
|
||||
import ListTable from './ListTable'
|
||||
import TreeTable from './TreeTable'
|
||||
import Vue from 'vue'
|
||||
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
||||
import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'dicList',
|
||||
components:{
|
||||
components: {
|
||||
ListTable,
|
||||
TreeTable
|
||||
},
|
||||
props:{
|
||||
dictVal:String,
|
||||
record:Object
|
||||
props: {
|
||||
dictVal: String,
|
||||
record: Object
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
selected:[],
|
||||
title:this.$t('add'),
|
||||
data() {
|
||||
return {
|
||||
selected: [],
|
||||
title: this.$t('add'),
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 16 },
|
||||
queryParams:{
|
||||
pageNo:1,
|
||||
pageSize:10
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},//查询条件
|
||||
form:{},
|
||||
newVisible:false,
|
||||
rules:{
|
||||
name:[
|
||||
form: {},
|
||||
newVisible: false,
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('enterName'), trigger: 'blur' },
|
||||
{ min:1, max: 100, message: this.$t('cantExeed')+'100'+this.$t('characters'), trigger: 'blur' },
|
||||
{ min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
itemText: [
|
||||
{ required: true, message: this.$t('enterName'), trigger: 'blur' },
|
||||
{ min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
itemText:[
|
||||
{ required: true, message: this.$t('enterName'), trigger: 'blur' },
|
||||
{ min:1, max: 100, message: this.$t('cantExeed')+'100'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
sortOrder: [
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'),trigger: 'blur'},
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'), trigger: 'blur' }
|
||||
],
|
||||
// itemValue:[
|
||||
// { required: true, message: this.$t('enterDataValue'), trigger: 'blur' },
|
||||
// { min:1, max: 30, message: this.$t('cantExeed')+'30'+this.$t('characters'), trigger: 'blur' },
|
||||
// ],
|
||||
enName:[
|
||||
enName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'), trigger: 'blur' },
|
||||
{ min:1, max: 100, message: this.$t('cantExeed')+'100'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
description:[
|
||||
{ min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
description: [
|
||||
// { required: true, message: this.$t('PleaseEnterDescription'), trigger: 'blur' },
|
||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||
]
|
||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
tableData:[],
|
||||
tabletreeData:[],
|
||||
parentName:undefined,
|
||||
treeData:[],
|
||||
parentVisible:false,
|
||||
dataFlag:false,
|
||||
total:0,
|
||||
isEdit:false,
|
||||
selectedIds:[], //树形选中的id
|
||||
parentData:[],
|
||||
editPId:'',
|
||||
tabletreeDataSource:[],
|
||||
flag:false, //提交表单标识
|
||||
tableData: [],
|
||||
tabletreeData: [],
|
||||
parentName: undefined,
|
||||
treeData: [],
|
||||
parentVisible: false,
|
||||
dataFlag: false,
|
||||
total: 0,
|
||||
isEdit: false,
|
||||
selectedIds: [], //树形选中的id
|
||||
parentData: [],
|
||||
editPId: '',
|
||||
tabletreeDataSource: [],
|
||||
flag: false, //提交表单标识
|
||||
parentDataPid: []
|
||||
}
|
||||
},
|
||||
@@ -144,60 +155,68 @@
|
||||
parentName(value) {
|
||||
// console.log(value);
|
||||
},
|
||||
editPId(){
|
||||
this.parentData=this.getParents
|
||||
},
|
||||
editPId() {
|
||||
this.parentData = this.getParents
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.loadData()
|
||||
},
|
||||
computed:{
|
||||
computed: {
|
||||
//获取父级名称
|
||||
getParents(){
|
||||
let parents=[]
|
||||
if(this.tabletreeDataSource&&this.tabletreeDataSource.length>0){
|
||||
this.tabletreeDataSource.forEach((item)=>{
|
||||
if(item.pid=='0'&&item.id!=this.editPId){
|
||||
parents.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
return parents
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
//获取列表数据
|
||||
loadData(){
|
||||
this.dataFlag=false
|
||||
if(this.dictVal=='list'){
|
||||
let params={
|
||||
...this.queryParams,
|
||||
dictId:this.record.id
|
||||
}
|
||||
|
||||
getAction(`sys/dictItem/page`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.total=res.result.total
|
||||
this.tableData=[...res.result.records]
|
||||
this.dataFlag=true
|
||||
getParents() {
|
||||
let parents = []
|
||||
if (this.tabletreeDataSource && this.tabletreeDataSource.length > 0) {
|
||||
this.tabletreeDataSource.forEach((item) => {
|
||||
if (item.pid == '0' && item.id != this.editPId) {
|
||||
parents.push(item)
|
||||
}
|
||||
})
|
||||
}else if(this.dictVal=='tree'){
|
||||
}
|
||||
return parents
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
test(rule, value, callback) {
|
||||
var money = /[,]|[,]/g
|
||||
if (money.test(value)) {
|
||||
callback(new Error(this.$t('disableInput') + ','))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
//获取列表数据
|
||||
loadData() {
|
||||
this.dataFlag = false
|
||||
if (this.dictVal == 'list') {
|
||||
let params = {
|
||||
...this.queryParams,
|
||||
dictId: this.record.id
|
||||
}
|
||||
|
||||
getAction(`sys/dictItem/page`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.total = res.result.total
|
||||
this.tableData = [...res.result.records]
|
||||
this.dataFlag = true
|
||||
}
|
||||
})
|
||||
} else if (this.dictVal == 'tree') {
|
||||
//sys/category/queryBySysDictId
|
||||
// sys/category/queryPageList
|
||||
postAction(`sys/category/queryPageList`,{
|
||||
postAction(`sys/category/queryPageList`, {
|
||||
...this.queryParams,
|
||||
// name:this.queryParams.itemText,
|
||||
sysDictId:this.record.id,
|
||||
isTagDict:1
|
||||
}).then(res=>{
|
||||
this.tabletreeDataSource=[...res.result.records]
|
||||
this.total=res.result.total
|
||||
sysDictId: this.record.id,
|
||||
isTagDict: 1
|
||||
}).then(res => {
|
||||
this.tabletreeDataSource = [...res.result.records]
|
||||
this.total = res.result.total
|
||||
let data = this.toTree(this.tabletreeDataSource)
|
||||
this.tabletreeData=data
|
||||
this.parentData=this.getParents
|
||||
this.dataFlag=true
|
||||
this.tabletreeData = data
|
||||
this.parentData = this.getParents
|
||||
this.dataFlag = true
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -214,150 +233,150 @@
|
||||
//将数据拼成树形结构
|
||||
toTree(config) {
|
||||
config.forEach(function(item) {
|
||||
delete item.children;
|
||||
});
|
||||
delete item.children
|
||||
})
|
||||
// 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
||||
let map = {};
|
||||
let map = {}
|
||||
config.forEach((item) => {
|
||||
// 树 的label
|
||||
item.label = item.name;
|
||||
item.key=item.id;
|
||||
map[item.id] = item;
|
||||
});
|
||||
let val = [];
|
||||
item.label = item.name
|
||||
item.key = item.id
|
||||
map[item.id] = item
|
||||
})
|
||||
let val = []
|
||||
config.forEach((item) => {
|
||||
// 以当前遍历项,的pid,去map对象中找到索引的id
|
||||
let parent = map[item.pid];
|
||||
let parent = map[item.pid]
|
||||
// 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item);
|
||||
(parent.children || (parent.children = [])).push(item)
|
||||
} else {
|
||||
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
||||
val.push(item);
|
||||
val.push(item)
|
||||
}
|
||||
});
|
||||
return val;
|
||||
})
|
||||
return val
|
||||
},
|
||||
|
||||
//搜索
|
||||
search(){
|
||||
this.queryParams.pageNo=1
|
||||
search() {
|
||||
this.queryParams.pageNo = 1
|
||||
this.loadData()
|
||||
},
|
||||
//重置
|
||||
reset(){
|
||||
this.queryParams={
|
||||
reset() {
|
||||
this.queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
this.loadData()
|
||||
},
|
||||
//新增
|
||||
dicAdd(){
|
||||
this.title=this.$t('add')
|
||||
this.isEdit=false
|
||||
this.newVisible=true;
|
||||
this.form={}
|
||||
if(this.dictVal=='list'){
|
||||
this.parentVisible=false
|
||||
dicAdd() {
|
||||
this.title = this.$t('add')
|
||||
this.isEdit = false
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
if (this.dictVal == 'list') {
|
||||
this.parentVisible = false
|
||||
|
||||
}else if(this.dictVal='tree'){
|
||||
this.parentVisible=true
|
||||
this.editPId=''
|
||||
//
|
||||
} else if (this.dictVal = 'tree') {
|
||||
this.parentVisible = true
|
||||
this.editPId = ''
|
||||
//
|
||||
this.getAllTree()
|
||||
}
|
||||
},
|
||||
getAllTree() {
|
||||
getAction(`sys/category/queryPid`,{
|
||||
sysDictId:this.record.id,
|
||||
isTagDict:1
|
||||
}).then(res=>{
|
||||
getAction(`sys/category/queryPid`, {
|
||||
sysDictId: this.record.id,
|
||||
isTagDict: 1
|
||||
}).then(res => {
|
||||
this.parentDataPid = res.result
|
||||
})
|
||||
},
|
||||
//保存
|
||||
hideModal(){
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
if(!this.flag) {
|
||||
this.flag = true
|
||||
hideModal() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.flag) {
|
||||
this.flag = true
|
||||
|
||||
if (this.dictVal == 'list') {
|
||||
let params = {
|
||||
...this.form,
|
||||
dictId: this.record.id,
|
||||
isTagDict: 1
|
||||
}
|
||||
if (this.isEdit) {
|
||||
putAction(`sys/dictItem/edit`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.reFresh()
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.flag=false
|
||||
})
|
||||
} else {
|
||||
postAction(`sys/dictItem/add`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.reFresh()
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.flag=false
|
||||
})
|
||||
}
|
||||
} else if (this.dictVal == 'tree') {
|
||||
let params = {
|
||||
...this.form,
|
||||
sysDictId: this.record.id
|
||||
}
|
||||
if (this.isEdit) {
|
||||
putAction(`sys/category/edit`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.flag=false
|
||||
})
|
||||
} else {
|
||||
//新增
|
||||
postAction(`sys/category/add`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.flag=false
|
||||
})
|
||||
}
|
||||
if (this.dictVal == 'list') {
|
||||
let params = {
|
||||
...this.form,
|
||||
dictId: this.record.id,
|
||||
isTagDict: 1
|
||||
}
|
||||
if (this.isEdit) {
|
||||
putAction(`sys/dictItem/edit`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.reFresh()
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.flag = false
|
||||
})
|
||||
} else {
|
||||
postAction(`sys/dictItem/add`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.reFresh()
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.flag = false
|
||||
})
|
||||
}
|
||||
} else if (this.dictVal == 'tree') {
|
||||
let params = {
|
||||
...this.form,
|
||||
sysDictId: this.record.id
|
||||
}
|
||||
if (this.isEdit) {
|
||||
putAction(`sys/category/edit`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.flag = false
|
||||
})
|
||||
} else {
|
||||
//新增
|
||||
postAction(`sys/category/add`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
this.newVisible = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.flag = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//刷新缓存
|
||||
reFresh(){
|
||||
reFresh() {
|
||||
getAction('sys/dict/refleshCache').then((res) => {
|
||||
if (res.success) {
|
||||
//重新加载缓存
|
||||
@@ -373,34 +392,34 @@
|
||||
})
|
||||
},
|
||||
//取消
|
||||
cancelModel(){
|
||||
this.newVisible=false;
|
||||
cancelModel() {
|
||||
this.newVisible = false
|
||||
},
|
||||
//列表编辑
|
||||
editDict(rec,val){
|
||||
this.title=this.$t('edit')
|
||||
this.isEdit=true
|
||||
this.form={...rec}
|
||||
this.newVisible=val
|
||||
this.parentVisible=false
|
||||
editDict(rec, val) {
|
||||
this.title = this.$t('edit')
|
||||
this.isEdit = true
|
||||
this.form = { ...rec }
|
||||
this.newVisible = val
|
||||
this.parentVisible = false
|
||||
},
|
||||
//树状编辑
|
||||
editTreeDict(val,form){
|
||||
this.title=this.$t('edit')
|
||||
this.editPId=form.id
|
||||
editTreeDict(val, form) {
|
||||
this.title = this.$t('edit')
|
||||
this.editPId = form.id
|
||||
// console.log('dictId',form)
|
||||
this.isEdit=true
|
||||
this.form={...form}
|
||||
if(form.pid=='0'){
|
||||
this.form.pid=''
|
||||
this.isEdit = true
|
||||
this.form = { ...form }
|
||||
if (form.pid == '0') {
|
||||
this.form.pid = ''
|
||||
}
|
||||
this.newVisible=val
|
||||
this.parentVisible=true
|
||||
this.newVisible = val
|
||||
this.parentVisible = true
|
||||
},
|
||||
//列表删除
|
||||
deleteDict(val){
|
||||
let params={
|
||||
id:val
|
||||
deleteDict(val) {
|
||||
let params = {
|
||||
id: val
|
||||
}
|
||||
|
||||
this.$confirm({
|
||||
@@ -408,83 +427,83 @@
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
//sys/dictItem/logicDelete
|
||||
//sys/dictItem/logicDelete
|
||||
// sys/dictItem/delete
|
||||
getAction(`sys/dictItem/logicDelete`, params).then(res => {
|
||||
if(res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'));
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.reFresh()
|
||||
if(this.tableData&&this.tableData.length==1&&this.queryParams.pageNo!=1){
|
||||
this.queryParams.pageNo=this.queryParams.pageNo-1
|
||||
if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) {
|
||||
this.queryParams.pageNo = this.queryParams.pageNo - 1
|
||||
}
|
||||
this.loadData()
|
||||
}else{
|
||||
this.$message.warning(res.message);
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleChange(){
|
||||
handleChange() {
|
||||
|
||||
},
|
||||
//树形选中行
|
||||
selectedKeys(val){
|
||||
this.selectedIds=val
|
||||
selectedKeys(val) {
|
||||
this.selectedIds = val
|
||||
// console.log('seleVal',val)
|
||||
},
|
||||
//批量删除
|
||||
batDelete(){
|
||||
let params={
|
||||
ids:this.selectedIds.join(',')
|
||||
batDelete() {
|
||||
let params = {
|
||||
ids: this.selectedIds.join(',')
|
||||
}
|
||||
|
||||
if(this.selectedIds && this.selectedIds.length>0){
|
||||
if (this.selectedIds && this.selectedIds.length > 0) {
|
||||
this.$confirm({
|
||||
title: this.$t('ConfirmDelete'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
if(this.dictVal=='list'){
|
||||
if (this.dictVal == 'list') {
|
||||
// sys/dictItem/logicDeleteBatch
|
||||
getAction(`sys/dictItem/logicDeleteBatch`, params).then(res => {
|
||||
if(res.success){
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.reFresh()
|
||||
if(this.selectedIds.length==this.tableData.length&&this.queryParams.pageNo!=1){
|
||||
this.queryParams.pageNo=this.queryParams.pageNo-1
|
||||
if (this.selectedIds.length == this.tableData.length && this.queryParams.pageNo != 1) {
|
||||
this.queryParams.pageNo = this.queryParams.pageNo - 1
|
||||
}
|
||||
this.loadData()
|
||||
|
||||
}else{
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}else if(this.dictVal=='tree'){
|
||||
} else if (this.dictVal == 'tree') {
|
||||
// sys/category/deleteBatch
|
||||
// sys/category/logicDeleteBatch
|
||||
|
||||
getAction(`sys/category/logicDeleteBatch`, params).then(res => {
|
||||
if(res.success){
|
||||
if(this.selectedIds.length==this.tableData.length&&this.queryParams.pageNo!=1){
|
||||
this.queryParams.pageNo=this.queryParams.pageNo-1
|
||||
if (res.success) {
|
||||
if (this.selectedIds.length == this.tableData.length && this.queryParams.pageNo != 1) {
|
||||
this.queryParams.pageNo = this.queryParams.pageNo - 1
|
||||
}
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loadData()
|
||||
}else{
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
ok(val){
|
||||
this.queryParams.pageNo=val.pageNo
|
||||
this.queryParams.pageSize=val.pageSize
|
||||
ok(val) {
|
||||
this.queryParams.pageNo = val.pageNo
|
||||
this.queryParams.pageSize = val.pageSize
|
||||
this.loadData()
|
||||
}
|
||||
}
|
||||
@@ -493,41 +512,47 @@
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
.dic-list{
|
||||
.dic-list-content{
|
||||
.dic-list-header{
|
||||
|
||||
.dic-list {
|
||||
.dic-list-content {
|
||||
.dic-list-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.form-btn{
|
||||
.form-btn-search{
|
||||
|
||||
.form-btn {
|
||||
.form-btn-search {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dic-list-module{
|
||||
|
||||
.dic-list-module {
|
||||
margin-bottom: 20px;
|
||||
|
||||
}
|
||||
.dic-list-table{
|
||||
|
||||
.dic-list-table {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dict-module{
|
||||
.ant-modal-footer{
|
||||
align:center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.dict-module{
|
||||
.ant-modal-footer{
|
||||
text-align:center;
|
||||
|
||||
.dict-module {
|
||||
.ant-modal-footer {
|
||||
align: center;
|
||||
}
|
||||
}
|
||||
.dic-list{
|
||||
.dic-list-content{
|
||||
.table-operator{
|
||||
</style>
|
||||
<style lang="less">
|
||||
.dict-module {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.dic-list {
|
||||
.dic-list-content {
|
||||
.table-operator {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
>
|
||||
<a-row>
|
||||
<p class="tag-info">{{$t('essentialInformation')}}</p>
|
||||
<a-divider dashed />
|
||||
<a-divider dashed/>
|
||||
<!-- 所属模块-->
|
||||
<a-col :span="24" v-if="submitKey == 1">
|
||||
<a-form-model-item :label="$t('Module')" prop="isModel">
|
||||
<a-select :placeholder="$t('PleaseSelectModule')" v-model="form.isModel">
|
||||
<a-select-option :key="'1'" :value="'1'" >
|
||||
<a-select-option :key="'1'" :value="'1'">
|
||||
{{$t('DocumentLibrary')}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
@@ -36,19 +36,22 @@
|
||||
<!-- 属性名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('AttributeName')" prop="dbFieldTxt">
|
||||
<a-input v-model="form.dbFieldTxt" :placeholder="$t('PleaseEnterPropertyName')" :maxLength="120" ></a-input>
|
||||
<a-input v-model="form.dbFieldTxt" :placeholder="$t('PleaseEnterPropertyName')"
|
||||
:maxLength="120"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 英文名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('enName')" prop="dbFieldEnName">
|
||||
<a-input v-model="form.dbFieldEnName" :placeholder="$t('PleaseEnterYourEnglishName')" :maxLength="120" ></a-input>
|
||||
<a-input v-model="form.dbFieldEnName" :placeholder="$t('PleaseEnterYourEnglishName')"
|
||||
:maxLength="120"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性类型-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('AttributeType')" prop="fieldShowType" >
|
||||
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" :placeholder="$t('PleaseSelectAttributeType')" :disabled="disabledEdit" />
|
||||
<a-form-model-item :label="$t('AttributeType')" prop="fieldShowType">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type"
|
||||
:placeholder="$t('PleaseSelectAttributeType')" :disabled="disabledEdit"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isTagContent">
|
||||
@@ -65,30 +68,33 @@
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isLength">
|
||||
<a-form-model-item :label="$t('FieldLength')" prop="dbLength">
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="200" :placeholder="$t('PleaseEnterFieldLength')" style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="200" :placeholder="$t('PleaseEnterFieldLength')"
|
||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('DisplayOrder')" prop="orderNum">
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%" :min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%"
|
||||
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('Required')" prop="fieldMustInput">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn" :placeholder="$t('selectWhetherRequired')" />
|
||||
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn"
|
||||
:placeholder="$t('selectWhetherRequired')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<p class="tag-info">{{submitKey == 1?$t('DocumentLibraryModuleDisplay'):$t('documentSplitDisplay')}}</p>
|
||||
<a-divider dashed />
|
||||
<a-divider dashed/>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('DocumentLibraryListDisplay')" prop="isShowList" v-if="submitKey == 1">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')" />
|
||||
<a-form-model-item :label="$t('DocumentLibraryListDisplay')" prop="isShowList" v-if="submitKey == 1">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')"/>
|
||||
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('documentSplitList')" prop="isShowList" v-if="submitKey == 2">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')" />
|
||||
<a-form-model-item :label="$t('documentSplitList')" prop="isShowList" v-if="submitKey == 2">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="submitKey == 1">
|
||||
@@ -103,20 +109,23 @@
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isSearch">
|
||||
<a-form-model-item :label="$t('Search')" prop="isQuery">
|
||||
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn" :placeholder="$t('SelectWhetherToSearch')" />
|
||||
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn"
|
||||
:placeholder="$t('SelectWhetherToSearch')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<p class="tag-info" v-if="submitKey == 1">{{$t('DisplayOtherModules')}}</p>
|
||||
<a-divider dashed v-if="submitKey == 1" />
|
||||
<a-divider dashed v-if="submitKey == 1"/>
|
||||
<a-col :span="24" v-if="submitKey == 1">
|
||||
<a-form-model-item :label="$t('RegulationsListDisplay')" prop="isShowLawsList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn" :placeholder="$t('selectDisplayListRegulations')" />
|
||||
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayListRegulations')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="submitKey == 1">
|
||||
<a-form-model-item :label="$t('SearchCenterDisplay')" prop="isShowSearch">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn" :placeholder="$t('selectSearchCenterDisplayed')" />
|
||||
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn"
|
||||
:placeholder="$t('selectSearchCenterDisplayed')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">-->
|
||||
@@ -132,383 +141,395 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { httpAction, getAction, postAction } from '@/api/manage'
|
||||
import pick from 'lodash.pick'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
import { httpAction, getAction, postAction } from '@/api/manage'
|
||||
import pick from 'lodash.pick'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'TagForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//流程表单data
|
||||
formData: {
|
||||
type: Object,
|
||||
default: ()=>{},
|
||||
required: false
|
||||
},
|
||||
//表单模式:true流程表单 false普通表单
|
||||
formBpm: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
drawerVisible:{
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
editData:{
|
||||
type: Object,
|
||||
default:{}
|
||||
},
|
||||
editId:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
submitEdit:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
disableEdit:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
submitKey:{
|
||||
type:String,
|
||||
default:'1'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
form: {},
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 },
|
||||
export default {
|
||||
name: 'TagForm',
|
||||
components: {},
|
||||
props: {
|
||||
//流程表单data
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
},
|
||||
required: false
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
//表单模式:true流程表单 false普通表单
|
||||
formBpm: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('PleaseSelectModule'),trigger: 'change'},
|
||||
],
|
||||
dbFieldTxt: [
|
||||
{ required: true, message: this.$t('PleaseEnterPropertyName'),trigger: 'blur'},
|
||||
{ min:1, max: 20, message: this.$t('cantExeed')+'20'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
dbFieldName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'),trigger: 'blur'},
|
||||
{ min:1, max: 20, message: this.$t('cantExeed')+'20'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
dbFieldEnName:[
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'),trigger: 'change'},
|
||||
{ max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
fieldShowType: [
|
||||
{ required: true, message: this.$t('PleaseSelectAttributeType'),trigger: 'change'},
|
||||
],
|
||||
dictId: [
|
||||
{ required: true, message: this.$t('PleaseSelectOptionContent'),trigger: 'change'},
|
||||
],
|
||||
dbLength: [
|
||||
{ required: true, message: this.$t('PleaseEnterFieldLength'),trigger: 'blur'},
|
||||
],
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'),trigger: 'blur'},
|
||||
],
|
||||
fieldMustInput: [
|
||||
{ required: true, message: this.$t('selectWhetherRequired'),trigger: 'change'},
|
||||
],
|
||||
isShowList: [
|
||||
{ required: true, message: this.$t('selectDisplayList'),trigger: 'change'},
|
||||
],
|
||||
showArea: [
|
||||
{ required: true, message: this.$t('SelectDisplayArea'),trigger: 'change'},
|
||||
],
|
||||
isQuery: [
|
||||
{ required: true, message: this.$t('SelectWhetherToSearch'),trigger: 'change'},
|
||||
],
|
||||
isShowLawsList: [
|
||||
{ required: true, message: this.$t('selectDisplayListRegulations'),trigger: 'change'},
|
||||
],
|
||||
isShowSearch: [
|
||||
{ required: true, message: this.$t('selectSearchCenterDisplayed'),trigger: 'change'},
|
||||
],
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
addVisible:false,
|
||||
url: {
|
||||
add: "tag/onlCgformTag/add",
|
||||
edit: "tag/onlCgformTag/edit",
|
||||
queryById: "tag/onlCgformTag/queryById"
|
||||
drawerVisible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//展示区域选项内容
|
||||
areaOptions:[],
|
||||
//选项内容选项
|
||||
contentOption:[],
|
||||
contentFlag:3,
|
||||
contentOption1:[],
|
||||
contentOption2:[],
|
||||
isTagContent:false,
|
||||
isSearch:true,
|
||||
isLength:true,
|
||||
flag:false, //表单提交标识
|
||||
disabledEdit:false,
|
||||
moduleShow:true
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'form.fieldShowType'(val){
|
||||
// this.contentFlag=val
|
||||
if(val==0){
|
||||
this.contentOption=[...this.contentOption2]
|
||||
this.isTagContent=true
|
||||
}else if(val==3||val==4){
|
||||
this.contentOption=[...this.contentOption1]
|
||||
this.isTagContent=true
|
||||
}else{
|
||||
this.isTagContent=false
|
||||
}
|
||||
if(val==7){
|
||||
this.isSearch=false
|
||||
this.form.isQuery=0
|
||||
}else{
|
||||
this.isSearch=true
|
||||
}
|
||||
if(val==1||val==8||val==9||val==10||val==11||val=='sel_user'){
|
||||
this.isLength=true
|
||||
}else{
|
||||
this.isLength=false
|
||||
editData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
editId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
submitEdit: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
disableEdit: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
submitKey: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
submitEdit(){
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('PleaseSelectModule'), trigger: 'change' }
|
||||
],
|
||||
dbFieldTxt: [
|
||||
{ required: true, message: this.$t('PleaseEnterPropertyName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
dbFieldName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
dbFieldEnName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'), trigger: 'change' },
|
||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
fieldShowType: [
|
||||
{ required: true, message: this.$t('PleaseSelectAttributeType'), trigger: 'change' }
|
||||
],
|
||||
dictId: [
|
||||
{ required: true, message: this.$t('PleaseSelectOptionContent'), trigger: 'change' }
|
||||
],
|
||||
dbLength: [
|
||||
{ required: true, message: this.$t('PleaseEnterFieldLength'), trigger: 'blur' }
|
||||
],
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'), trigger: 'blur' }
|
||||
],
|
||||
fieldMustInput: [
|
||||
{ required: true, message: this.$t('selectWhetherRequired'), trigger: 'change' }
|
||||
],
|
||||
isShowList: [
|
||||
{ required: true, message: this.$t('selectDisplayList'), trigger: 'change' }
|
||||
],
|
||||
showArea: [
|
||||
{ required: true, message: this.$t('SelectDisplayArea'), trigger: 'change' }
|
||||
],
|
||||
isQuery: [
|
||||
{ required: true, message: this.$t('SelectWhetherToSearch'), trigger: 'change' }
|
||||
],
|
||||
isShowLawsList: [
|
||||
{ required: true, message: this.$t('selectDisplayListRegulations'), trigger: 'change' }
|
||||
],
|
||||
isShowSearch: [
|
||||
{ required: true, message: this.$t('selectSearchCenterDisplayed'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
addVisible: false,
|
||||
url: {
|
||||
add: 'tag/onlCgformTag/add',
|
||||
edit: 'tag/onlCgformTag/edit',
|
||||
queryById: 'tag/onlCgformTag/queryById'
|
||||
},
|
||||
//展示区域选项内容
|
||||
areaOptions: [],
|
||||
//选项内容选项
|
||||
contentOption: [],
|
||||
contentFlag: 3,
|
||||
contentOption1: [],
|
||||
contentOption2: [],
|
||||
isTagContent: false,
|
||||
isSearch: true,
|
||||
isLength: true,
|
||||
flag: false, //表单提交标识
|
||||
disabledEdit: false,
|
||||
moduleShow: true
|
||||
}
|
||||
},
|
||||
disableEdit(){
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
changeType(val){
|
||||
// console.log('changtType',val)
|
||||
},
|
||||
formDisabled(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
return false
|
||||
watch: {
|
||||
'form.fieldShowType'(val) {
|
||||
// this.contentFlag=val
|
||||
if (val == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (val == 3 || val == 4) {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
return true
|
||||
if (val == 7) {
|
||||
this.isSearch = false
|
||||
this.form.isQuery = 0
|
||||
} else {
|
||||
this.isSearch = true
|
||||
}
|
||||
if (val == 1 || val == 8 || val == 9 || val == 10 || val == 11 || val == 'sel_user') {
|
||||
this.isLength = true
|
||||
} else {
|
||||
this.isLength = false
|
||||
}
|
||||
},
|
||||
submitEdit() {
|
||||
|
||||
},
|
||||
disableEdit() {
|
||||
|
||||
}
|
||||
return this.disabled
|
||||
|
||||
},
|
||||
showFlowSubmitButton(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
computed: {
|
||||
changeType(val) {
|
||||
// console.log('changtType',val)
|
||||
},
|
||||
formDisabled() {
|
||||
if (this.formBpm === true) {
|
||||
if (this.formData.disabled === false) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
return this.disabled
|
||||
},
|
||||
showFlowSubmitButton() {
|
||||
if (this.formBpm === true) {
|
||||
if (this.formData.disabled === false) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
//如果是流程中表单,则需要加载流程表单data
|
||||
this.showFlowData();
|
||||
},
|
||||
mounted() {
|
||||
// console.log('disableEdit',this.disableEdit)
|
||||
this.loadContent()
|
||||
this.loadShowArea()
|
||||
// console.log('edit',this.submitKey)
|
||||
if(this.submitEdit==='add'){
|
||||
if(this.submitKey==='1'){
|
||||
this.form.isModel='1'
|
||||
this.moduleShow=true
|
||||
}else if(this.submitKey=='2'){
|
||||
this.form.isModel='0'
|
||||
this.moduleShow=false
|
||||
}
|
||||
this.disabledEdit=false
|
||||
}else if(this.submitEdit==='edit'){
|
||||
if(this.submitKey==='1'){
|
||||
this.form.isModel='1'
|
||||
this.moduleShow=true
|
||||
}else if(this.submitKey=='2'){
|
||||
this.form.isModel='0'
|
||||
this.moduleShow=false
|
||||
}
|
||||
this.disabledEdit=true
|
||||
},
|
||||
created() {
|
||||
//如果是流程中表单,则需要加载流程表单data
|
||||
this.showFlowData()
|
||||
},
|
||||
mounted() {
|
||||
// console.log('disableEdit',this.disableEdit)
|
||||
this.loadContent()
|
||||
this.loadShowArea()
|
||||
// console.log('edit',this.submitKey)
|
||||
if (this.submitEdit === 'add') {
|
||||
if (this.submitKey === '1') {
|
||||
this.form.isModel = '1'
|
||||
this.moduleShow = true
|
||||
} else if (this.submitKey == '2') {
|
||||
this.form.isModel = '0'
|
||||
this.moduleShow = false
|
||||
}
|
||||
this.disabledEdit = false
|
||||
} else if (this.submitEdit === 'edit') {
|
||||
if (this.submitKey === '1') {
|
||||
this.form.isModel = '1'
|
||||
this.moduleShow = true
|
||||
} else if (this.submitKey == '2') {
|
||||
this.form.isModel = '0'
|
||||
this.moduleShow = false
|
||||
}
|
||||
this.disabledEdit = true
|
||||
|
||||
}
|
||||
this.form={...this.editData}
|
||||
// console.log('this.form.isModel',this.form.isModel)
|
||||
},
|
||||
methods: {
|
||||
//获取选项内容
|
||||
loadContent(){
|
||||
let params = {};
|
||||
getAction(`sys/dict/queryDictName`,params).then((res)=>{
|
||||
if(res.success){
|
||||
let data=[...res.result]
|
||||
this.contentOption1=[]
|
||||
this.contentOption2=[]
|
||||
data.map(res=>{
|
||||
if(res.attributeType=='1'){
|
||||
this.contentOption1.push(res)
|
||||
}else if(res.attributeType=='2'){
|
||||
this.contentOption2.push(res)
|
||||
}
|
||||
this.form = { ...this.editData }
|
||||
// console.log('this.form.isModel',this.form.isModel)
|
||||
},
|
||||
methods: {
|
||||
test(rule, value, callback) {
|
||||
var money = /[,]|[,]/g
|
||||
if (money.test(value)) {
|
||||
callback(new Error(this.$t('disableInput') + ','))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
//获取选项内容
|
||||
loadContent() {
|
||||
let params = {}
|
||||
getAction(`sys/dict/queryDictName`, params).then((res) => {
|
||||
if (res.success) {
|
||||
let data = [...res.result]
|
||||
this.contentOption1 = []
|
||||
this.contentOption2 = []
|
||||
data.map(res => {
|
||||
if (res.attributeType == '1') {
|
||||
this.contentOption1.push(res)
|
||||
} else if (res.attributeType == '2') {
|
||||
this.contentOption2.push(res)
|
||||
}
|
||||
})
|
||||
if (this.form.fieldShowType == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (this.form.fieldShowType == 3 || this.form.fieldShowType == '4') {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取展示区域
|
||||
loadShowArea() {
|
||||
let params = {}
|
||||
getAction(`tag/onlCgformArea/queryShowArea`, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.areaOptions = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.edit({})
|
||||
|
||||
},
|
||||
edit(record) {
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
// this.form.setFieldsValue(pick(this.model,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowList','showArea','isQuery','isShowLawsList','isShowSearch'))
|
||||
})
|
||||
},
|
||||
//渲染流程表单数据
|
||||
showFlowData() {
|
||||
if (this.formBpm === true) {
|
||||
let params = { id: this.formData.dataId }
|
||||
getAction(this.url.queryById, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.edit(res.result)
|
||||
}
|
||||
})
|
||||
if(this.form.fieldShowType==0){
|
||||
this.contentOption=[...this.contentOption2]
|
||||
this.isTagContent=true
|
||||
}else if(this.form.fieldShowType==3||this.form.fieldShowType=='4'){
|
||||
this.contentOption=[...this.contentOption1]
|
||||
this.isTagContent=true
|
||||
}else{
|
||||
this.isTagContent=false
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取展示区域
|
||||
loadShowArea(){
|
||||
let params = {};
|
||||
getAction(`tag/onlCgformArea/queryShowArea`,params).then((res)=>{
|
||||
if(res.success){
|
||||
this.areaOptions=res.result
|
||||
}
|
||||
});
|
||||
},
|
||||
add () {
|
||||
this.edit({});
|
||||
},
|
||||
submitForm() {
|
||||
// const that = this;
|
||||
// 触发表单验证
|
||||
this.form.dbFieldTxt = this.form.dbFieldTxt.trim()
|
||||
this.form.dbFieldEnName = this.form.dbFieldEnName.trim()
|
||||
this.form.dbFieldTxt = this.form.dbFieldTxt.trim()
|
||||
// console.log(this.$refs.tagform)
|
||||
this.$refs.tagEditForm.validate((valid) => {
|
||||
// console.log('valid',valid)
|
||||
if (valid) {
|
||||
if (!this.flag) {
|
||||
this.flag = true
|
||||
this.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method = ''
|
||||
// console.log('this.editId',this.editId)
|
||||
if (this.submitEdit == 'add') {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
this.form.id = ''
|
||||
this.form.isReadOnly = 0
|
||||
} else if (this.submitEdit == 'edit') {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
this.form.id = this.editId
|
||||
|
||||
},
|
||||
edit (record) {
|
||||
this.form.resetFields();
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
// this.form.setFieldsValue(pick(this.model,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowList','showArea','isQuery','isShowLawsList','isShowSearch'))
|
||||
})
|
||||
},
|
||||
//渲染流程表单数据
|
||||
showFlowData(){
|
||||
if(this.formBpm === true){
|
||||
let params = {id:this.formData.dataId};
|
||||
getAction(this.url.queryById,params).then((res)=>{
|
||||
if(res.success){
|
||||
this.edit (res.result);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
submitForm () {
|
||||
// const that = this;
|
||||
// 触发表单验证
|
||||
this.form.dbFieldTxt = this.form.dbFieldTxt.trim()
|
||||
this.form.dbFieldEnName = this.form.dbFieldEnName.trim()
|
||||
this.form.dbFieldTxt = this.form.dbFieldTxt.trim()
|
||||
// console.log(this.$refs.tagform)
|
||||
this.$refs.tagEditForm.validate((valid)=>{
|
||||
// console.log('valid',valid)
|
||||
if (valid) {
|
||||
if(!this.flag){
|
||||
this.flag=true
|
||||
this.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
// console.log('this.editId',this.editId)
|
||||
if(this.submitEdit=='add'){
|
||||
httpurl+=this.url.add;
|
||||
method = 'post';
|
||||
this.form.id=''
|
||||
this.form.isReadOnly=0
|
||||
}else if(this.submitEdit=='edit'){
|
||||
httpurl+=this.url.edit;
|
||||
method = 'put';
|
||||
this.form.id=this.editId
|
||||
|
||||
}
|
||||
this.form.dbIsKey='0'
|
||||
this.form.dbIsNull='1'
|
||||
this.form.dbPointLength='0'
|
||||
this.form.isShowForm='1'
|
||||
this.form.dbFieldName=this.form.dbFieldTxt
|
||||
this.contentOption.forEach(item=>{
|
||||
if(item.id==this.form.dictId){
|
||||
// console.log('11111')
|
||||
this.form.dictField=item.dictCode
|
||||
this.form.dictText=item.dictName
|
||||
}
|
||||
})
|
||||
// console.log('form',this.form)
|
||||
// console.log('model',this.form.isModel)
|
||||
let onlineId=''
|
||||
let url=''
|
||||
if(this.form.isModel=='1'){
|
||||
onlineId='48308196e7b04761b533dc31bc899707'
|
||||
}else if(this.form.isModel=='0'){
|
||||
onlineId='c998a34ea4b84089932197ed0705c757'
|
||||
}
|
||||
httpAction(httpurl,this.form,method).then((res)=>{
|
||||
if(res.success){
|
||||
this.$message.success(this.$t('OperationSuccessful'));
|
||||
postAction(`online/cgform/api/doDbSynch/${onlineId}/normal
|
||||
`,{}).then(res=>{
|
||||
})
|
||||
this.$emit('ok',false);
|
||||
}else{
|
||||
this.$message.warning(res.message);
|
||||
this.form.dbIsKey = '0'
|
||||
this.form.dbIsNull = '1'
|
||||
this.form.dbPointLength = '0'
|
||||
this.form.isShowForm = '1'
|
||||
this.form.dbFieldName = this.form.dbFieldTxt
|
||||
this.contentOption.forEach(item => {
|
||||
if (item.id == this.form.dictId) {
|
||||
// console.log('11111')
|
||||
this.form.dictField = item.dictCode
|
||||
this.form.dictText = item.dictName
|
||||
}
|
||||
})
|
||||
// console.log('form',this.form)
|
||||
// console.log('model',this.form.isModel)
|
||||
let onlineId = ''
|
||||
let url = ''
|
||||
if (this.form.isModel == '1') {
|
||||
onlineId = '48308196e7b04761b533dc31bc899707'
|
||||
} else if (this.form.isModel == '0') {
|
||||
onlineId = 'c998a34ea4b84089932197ed0705c757'
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false;
|
||||
this.flag=false
|
||||
})
|
||||
httpAction(httpurl, this.form, method).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
postAction(`online/cgform/api/doDbSynch/${onlineId}/normal
|
||||
`, {}).then(res => {
|
||||
})
|
||||
this.$emit('ok', false)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
this.flag = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
popupCallback(row) {
|
||||
this.form.setFieldsValue(pick(row, 'isModel', 'dbFieldTxt', 'dbFieldName', 'fieldShowType', 'dictName', 'dbLength', 'orderNum', 'fieldMustInput', 'isShowForm', 'areaId', 'isQuery', 'isShowLawsList', 'isShowSearch'))
|
||||
},
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
})
|
||||
},
|
||||
popupCallback(row){
|
||||
this.form.setFieldsValue(pick(row,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowForm','areaId','isQuery','isShowLawsList','isShowSearch'))
|
||||
},
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
},
|
||||
handleChange(value) {
|
||||
// console.log(`selected ${value}`);
|
||||
}
|
||||
},
|
||||
handleChange(value) {
|
||||
// console.log(`selected ${value}`);
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.form-tag{
|
||||
.tag-content{
|
||||
.form-tag {
|
||||
.tag-content {
|
||||
}
|
||||
}
|
||||
|
||||
.tag-info {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
.tag-info{
|
||||
margin-left: 30px;
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.tag-content{
|
||||
.ant-select-selection-selected-value{
|
||||
color:rgba(0, 0, 0, 0.65);
|
||||
.tag-content {
|
||||
.ant-select-selection-selected-value {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -53,7 +53,8 @@
|
||||
:placeholder="$t('PleaseSelectLabelType')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('DisplayOrder')" prop="orderNum" class="tag-item">
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%" :min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%"
|
||||
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="describe" :label="$t('describe')" prop="description" class="tag-item">
|
||||
<a-input
|
||||
@@ -174,14 +175,16 @@
|
||||
wrapperCol: { span: 16 },
|
||||
form: {},
|
||||
rules: {
|
||||
dictName: [{ required: true, message: this.$t('PleaseEnterLabelName'), trigger: 'change' },
|
||||
{ min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' }],
|
||||
dictName: [
|
||||
{ required: true, message: this.$t('PleaseEnterLabelName'), trigger: 'change' },
|
||||
{ min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
attributeType: [
|
||||
{ required: true, message: this.$t('PleaseSelectLabelType'), trigger: 'blur' }
|
||||
|
||||
],
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'),trigger: 'blur'},
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'), trigger: 'blur' }
|
||||
],
|
||||
description: [
|
||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' }
|
||||
@@ -200,6 +203,14 @@
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
test(rule, value, callback) {
|
||||
var money = /[,]|[,]/g
|
||||
if (money.test(value)) {
|
||||
callback(new Error(this.$t('disableInput') + ','))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
if (typeof value === 'string') {
|
||||
@@ -476,6 +487,7 @@
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
<img v-else-if="val.status == 2" src="../../../../assets/open.svg"
|
||||
class="process-content-left"
|
||||
alt="">
|
||||
<img v-else-if="val.status == 3" src="../../../../assets/inprogress.svg" class="process-content-left"
|
||||
<img v-else-if="val.status == 3" src="../../../../assets/inprogress.svg"
|
||||
class="process-content-left"
|
||||
alt="">
|
||||
</a-tooltip>
|
||||
<!-- <div class="process-content-right-button">{{val.time.slice(0,11)}}</div>-->
|
||||
@@ -228,8 +229,8 @@
|
||||
}
|
||||
contentRightText[0].style = 'display:none'
|
||||
contentRightXian[0].style = 'display:none'
|
||||
let clientWidthOne = dataList[0].clientWidth * dataList.length
|
||||
clientWidthOne = clientWidthOne / timeList.length
|
||||
let clientWidthOne = dataList[0].clientWidth
|
||||
clientWidthOne = clientWidthOne / length
|
||||
let num = Math.ceil(clientWidthOne / 31) * parseInt(this.handlingTime.slice(8, 10))
|
||||
timeList.forEach((res, index) => {
|
||||
if (res.slice(0, 7) == this.handlingTime.slice(0, 7)) {
|
||||
@@ -389,7 +390,6 @@
|
||||
border-bottom: 1px #EAEAEC solid;
|
||||
flex: 1;
|
||||
height: 36px;
|
||||
padding-left: 10px;
|
||||
color: #54565A;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
|
||||
Reference in New Issue
Block a user