Commit eb7b058c authored by renjintao's avatar renjintao

Merge branch 'portal' of git.mes123.com:zhouyx/mes-ui into portal

parents fab53bd0 2fccf7f8
<template> <template>
<Col :span="span" class="filed-col"> <Col :span="span" class="filed-col">
<label v-text="name" class="label"></label> <div class="label">
<span> <label v-text="name"></label>
</div>
<div class="value">
<slot></slot> <slot></slot>
</span> </div>
</Col> </Col>
</template> </template>
<script> <script>
export default { export default {
name: 'filed', name: "filed",
props: { props: {
name: { name: {
type: String type: String
...@@ -18,29 +20,70 @@ export default { ...@@ -18,29 +20,70 @@ export default {
default: 12 default: 12
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
.detail { .detail {
display: table; display: table;
height: 100%;
border-collapse: collapse; border-collapse: collapse;
background: white;
.ivu-row {
border: 1px solid #ddd;
border-top: none;
height: 100%;
.filed-col {
border: 1px solid #ddd;
border-right: none;
margin: 0 -1px -1px -1px;
// box-sizing: border-box;
display: flex;
flex-direction: row;
line-height: 40px;
> .label {
background: #f7f7f7;
flex-grow: 0;
width: 120px;
text-align: right;
padding: 0 8px;
border-right: 1px solid #ddd;
flex-shrink: 0;
}
> .value {
word-break: break-all;
word-wrap: break-word;
flex-grow: 1;
padding-left: 10px;
> div {
line-height: 30px;
}
}
}
}
}
.new-detail {
.ivu-row { .ivu-row {
display: table-row; width: 100% !important;
border-top: 1px solid #ddd;
border-left: 1px solid #ddd;
.filed-col { .filed-col {
display: table-cell;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
// margin: 0 0 -1px -1px;
line-height: 30px;
box-sizing: border-box; box-sizing: border-box;
.label { line-height: 70px;
background: #e8eaf1; display: flex;
flex-direction: row;
> .label {
display: inline-block; display: inline-block;
width: 100px; width: 100px;
text-align: right; text-align: right;
padding: 0 5px; line-height: 40px;
height: 100%;
font-weight: bold;
}
> .value {
text-align: left;
height: 100%;
word-break: break-all;
word-wrap: break-word;
line-height: 20px;
padding-top: 10px;
} }
} }
} }
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
detail:"查看", detail:"查看",
edit:"编辑", edit:"编辑",
add:"添加", add:"添加",
delete:"删除" delete:"删除",
}; };
if(oprates[this.oprate]){ if(oprates[this.oprate]){
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
}else if(this.oprate){ }else if(this.oprate){
this.css=this.oprate; this.css=this.oprate;
}else if(this.type=='icon'){ }else if(this.type=='icon'){
this.css='icon' this.css='icon';
} }
}, },
methods:{ methods:{
......
export default { export default {
locale: 'zh-CN', locale: 'zh-CN',
language: '简体中文', language: '简体中文',
menu: { menu: {
i18n: '多语言' i18n: '多语言'
},
page: {
login: {
title: '登录',
remember: '自动登录',
forgot: '忘记密码',
submit: '登录',
other: '其它登录方式',
signup: '注册账户'
}, },
register: { page: {
title: '注册', login: {
submit: '注册', title: '登录',
other: '使用已有账户登录' remember: '自动登录',
forgot: '忘记密码',
submit: '登录',
other: '其它登录方式',
signup: '注册账户'
},
register: {
title: '注册',
submit: '注册',
other: '使用已有账户登录'
},
exception: {
e403: '抱歉,你无权访问该页面',
e404: '抱歉,你访问的页面不存在',
e500: '抱歉,服务器出错了',
btn: '返回首页'
},
i18n: {
content: '你好,很高兴认识你!'
}
}, },
exception: { user: {
e403: '抱歉,你无权访问该页面', id: 'ID',
e404: '抱歉,你访问的页面不存在', userName: '姓名',
e500: '抱歉,服务器出错了', name: '姓名',
btn: '返回首页' cardTypeId: '卡类型ID',
cardNo: '员工编号',
gender: '性别',
birthday: '出生年月',
title: '职称',
workLicense: '上岗证',
equipment: '可操控设备',
email: '邮箱',
phone: '电话',
department: '所属部门',
jobName: '职位名称',
role: '角色',
account: '用户帐号',
employeeNo: '员工编号',
modifyTime: '修改时间',
remark: '备注',
degreeId: '学历',
degree: '学历',
departmentId: '部门id',
national: '国籍',
status: '状态',
creatorUserId: '创建人',
creationTime: '创建时间',
lastModifierUserId: '最后修改人',
lastModificationTime: '最后修改时间',
accountId: '用户账号',
isDeleted: '是否删除',
positionId: '职位',
licensedToWork: '上岗证',
titleId: '职称',
jobNo: '工号',
departmentTitle: '所属部门',
roleTitles: '角色名称',
enableEquip: '可操控设备',
property: '属性'
}, },
i18n: { resource: {
content: '你好,很高兴认识你!' id: '编号',
} creationTime: '创建时间',
}, creatorUserId: '创建人',
user: { lastModificationTime: '更新时间',
id: 'ID', lastModifierUserId: '更新人',
userName: '姓名', isDeleted: '',
name: '姓名', deletionTime: '',
cardTypeId: '卡类型ID', deleterUserId: '',
cardNo: '员工编号', resourceId: '资源编号',
gender: '性别', resourceCode: '资源编号',
birthday: '出生年月', nameOfResource: '资源名称',
title: '职称', specifications: '规格',
workLicense: '上岗证', measuringUnit: '计量单位',
equipment: '可操控设备', qualityCharacteristics: '质量特性',
email: '邮箱', batchNo: '批次号',
phone: '电话', storeId: '库位ID',
department: '所属部门', storeTitle: '库位',
jobName: '职位名称', state: '状态',
role: '角色', resourceType: '资源类型',
account: '用户帐号', totalNum: '总数',
employeeNo: '员工编号', numberAvailable: '库存',
modifyTime: '修改时间', count: '数量',
remark: '备注', action: '操作',
degreeId: '学历', creationTime: '操作时间',
degree: '学历', libraryTube: '操作人',
departmentId: '部门id', },
national: '国籍', MaterialPowder: {
status: '状态', code: '粉末编码',
creatorUserId: '创建人', name: '名称',
creationTime: '创建时间', brand: '牌号',
lastModifierUserId: '最后修改人', specifications: '规格',
lastModificationTime: '最后修改时间', originalManufacturer: '原厂家',
accountId: '用户账号', batch: '批次号',
isDeleted: '是否删除', totalInventory: '入库总量(kg)',
positionId: '职位', remainingAmount: '剩余量(kg)',
licensedToWork: '上岗证', remainingAmount1: '实际剩余量(kg)',
titleId: '职称', changeState: '盈亏',
jobNo: '工号', unitPrice: '单价(元/kg)',
departmentTitle: '所属部门', certificateOfApproval: '合格证',
roleTitles: '角色名称', storeId: '库位Id',
enableEquip: '可操控设备', storeTitle: '库位',
property: '属性' location: '位置',
}, category: '类别',
resource: { reinspectionDate: '复验日期',
id: '编号', reinspectionStatus: '复验状态',
creationTime: '创建时间', id: '编号',
creatorUserId: '创建人', creationTime: '创建时间',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '', deletionTime: '',
deletionTime: '', deleterUserId: '',
deleterUserId: '', isDeleted: '',
resourceId: '资源编号', creator: "经办人",
resourceCode: '资源编号', creatorUserId: "经办人Id",
nameOfResource: '资源名称', storeCode: '入库编号',
specifications: '规格', minNum: '最低库存',
measuringUnit: '计量单位', remark: '备注',
qualityCharacteristics: '质量特性', total: '总数',
batchNo: '批次号', batchNo: '批次号',
storeId: '库位ID', },
storeTitle: '库位', waitReview: {
state: '状态', id: '',
resourceType: '资源类型', brand: '粉末牌号',
totalNum: '总数', name: '粉末名称',
numberAvailable: '库存', specifications: '粉末规格',
count: '数量', batchNo: '批次号',
action: '操作', originalManufacturer: '生产厂家',
creationTime: '操作时间', reinspectionDate: '复验日期',
libraryTube: '操作人', remainingAmount: '库存余量',
}, storeId: '货架号',
MaterialPowder: { location: '所处位置',
code: '粉末编码', category: '粉末类别',
name: '名称', reinspectionStatus: '复验状态',
brand: '牌号', },
specifications: '规格', MaterialPlacode: {
originalManufacturer: '原厂家', id: '',
batch: '批次号', substrateCoding: '基板编码',
totalInventory: '入库总量(kg)', name: '名称',
remainingAmount: '剩余量(kg)', brand: '牌号',
remainingAmount1: '实际剩余量(kg)', specifications: '规格',
changeState: '盈亏', baseMaterial: '基板材质',
unitPrice: '单价(元/kg)', materialNumber: '材料编号',
certificateOfApproval: '合格证', applyToEquipment: '适用设备',
storeId: '库位Id', thickness: '厚度(mm)',
storeTitle: '库位', state: '状态',
location: '位置', location: '所处位置',
category: '类别', inventory: '库存',
reinspectionDate: '复验日期', minNum: '最低库存',
reinspectionStatus: '复验状态', availableInStock: '可用库存',
id: '编号', remainingAmount1: '实际库存',
creationTime: '创建时间', creator: '经办人',
lastModificationTime: '更新时间', storeId: '库位Id',
lastModifierUserId: '更新人', storeTitle: '库位',
deletionTime: '', changeState: '盈亏',
deleterUserId: '', remark: '备注',
isDeleted: '', total: '总数',
creator: "经办人", code: '基板编码',
creatorUserId: "经办人Id",
storeCode: '入库编号',
minNum: '最低库存',
remark: '备注',
total: '总数',
batchNo: '批次号',
},
waitReview: {
id: '',
brand: '粉末牌号',
name: '粉末名称',
specifications: '粉末规格',
batchNo: '批次号',
originalManufacturer: '生产厂家',
reinspectionDate: '复验日期',
remainingAmount: '库存余量',
storeId: '货架号',
location: '所处位置',
category: '粉末类别',
reinspectionStatus: '复验状态',
},
MaterialPlacode: {
id: '',
substrateCoding: '基板编码',
name: '名称',
brand: '牌号',
specifications: '规格',
baseMaterial: '基板材质',
materialNumber: '材料编号',
applyToEquipment: '适用设备',
thickness: '厚度(mm)',
state: '状态',
location: '所处位置',
inventory: '库存',
minNum: '最低库存',
availableInStock: '可用库存',
remainingAmount1: '实际库存',
creator: '经办人',
storeId: '库位Id',
storeTitle: '库位',
changeState: '盈亏',
remark: '备注',
total: '总数',
code: '基板编码',
}, },
MaterialScraper: { MaterialScraper: {
id: '编号', id: '编号',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
code: '刮刀编号', code: '刮刀编号',
materialSpecification: '材质/规格', materialSpecification: '材质/规格',
applyEquipment: '适用设备', applyEquipment: '适用设备',
freeCount: '剩余套数', freeCount: '剩余套数',
remainingAmount1: '实际套数', remainingAmount1: '实际套数',
inCount: '入库套数', inCount: '入库套数',
quantityCount: '每套数量(片)', quantityCount: '每套数量(片)',
price: '单价(元/套)', price: '单价(元/套)',
storageTime: '入库时间', storageTime: '入库时间',
location: '所处位置', location: '所处位置',
minNum: '最低库存', minNum: '最低库存',
creator: '经办人', creator: '经办人',
storeId: '库位Id', storeId: '库位Id',
storeTitle: '库位', storeTitle: '库位',
changeState: '盈亏', changeState: '盈亏',
remark: '备注', remark: '备注',
total: '总数', total: '总数',
specifications: '材质/规格', specifications: '材质/规格',
applyToEquipment: '适用设备', applyToEquipment: '适用设备',
unitPrice: '单价(元/套)', unitPrice: '单价(元/套)',
}, },
order_material: { order_material: {
id: '编号', id: '编号',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '', isDeleted: '',
deleterUserId: '', deleterUserId: '',
deletionTime: '', deletionTime: '',
code: '料单编号', code: '料单编号',
name: '料单名称', name: '料单名称',
platesnum: '基板数量', platesnum: '基板数量',
quotaPerBoard: '每板定额', quotaPerBoard: '每板定额',
fileTemplate: '文件模版', fileTemplate: '文件模版',
remarks: '备注', remarks: '备注',
extend: '扩展字段', extend: '扩展字段',
orderids: '订单编号', orderids: '订单编号',
status: '料单状态', status: '料单状态',
}, },
menu: { menu: {
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
name: '名称', name: '名称',
upId: '父级', upId: '父级',
upTitle: '上级名称', upTitle: '上级名称',
type: '类型', type: '类型',
code: '编码', code: '编码',
icon: '图标', icon: '图标',
target: '打开方式', target: '打开方式',
url: '地址', url: '地址',
status: '显示', status: '显示',
description: '备注', description: '备注',
source: '来源', source: '来源',
app: '系统', app: '系统',
priority: '排序', priority: '排序',
}, },
order_material: { order_material: {
id: '编号', id: '编号',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '', isDeleted: '',
deleterUserId: '', deleterUserId: '',
deletionTime: '', deletionTime: '',
code: '料单编号', code: '料单编号',
name: '料单名称', name: '料单名称',
platesnum: '基板数量', platesnum: '基板数量',
quotaPerBoard: '每板定额', quotaPerBoard: '每板定额',
fileTemplate: '文件模版', fileTemplate: '文件模版',
remarks: '备注', remarks: '备注',
extend: '扩展字段', extend: '扩展字段',
orderids: '订单编号', orderids: '订单编号',
status: '料单状态', status: '料单状态',
}, },
business_code_config: { business_code_config: {
id: '编号', id: '编号',
businessName: '业务名称', businessName: '业务名称',
businessCode: '业务代号', businessCode: '业务代号',
prefix: '编码前缀', prefix: '编码前缀',
maxSerial: '最大序列号', maxSerial: '最大序列号',
day: '清零规则', day: '清零规则',
remark: '备注', remark: '备注',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
}, },
method: { method: {
id: 'Id', id: 'Id',
title: '名称', title: '名称',
methodDescription: '方法描述', methodDescription: '方法描述',
controller: '模块', controller: '模块',
controllerDescription: '模块描述', controllerDescription: '模块描述',
service: '服务', service: '服务',
serviceDescription: '服务描述', serviceDescription: '服务描述',
url: '地址', url: '地址',
httpMethod: '方法', httpMethod: '方法',
level: '级别', level: '级别',
creatorUserId: '创建人呢', creatorUserId: '创建人呢',
lastModificationTime: '修改时间', lastModificationTime: '修改时间',
lastModifierUserId: '修改人', lastModifierUserId: '修改人',
isDeleted: '是否删除', isDeleted: '是否删除',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除用户', deleterUserId: '删除用户',
creationTime: '创建时间', creationTime: '创建时间',
}, },
mes_order_watch: { //订单监控 mes_order_watch: { //订单监控
id: '', id: '',
status: '订单状态', status: '订单状态',
mesCode: '订单编号', mesCode: '订单编号',
demandStartDate: '计划开始时间', demandStartDate: '计划开始时间',
demandFinishDate: '计划结束时间', demandFinishDate: '计划结束时间',
actualStartDate: '实际开始时间', actualStartDate: '实际开始时间',
actualFinishDate: '实际结束时间', actualFinishDate: '实际结束时间',
productName: '产品名称', productName: '产品名称',
drawnNumber: '图号', drawnNumber: '图号',
routingType: '工艺类型', routingType: '工艺类型',
orderWarning: '订单预警', orderWarning: '订单预警',
startWarning: '开工预警', startWarning: '开工预警',
finishWarning: '完工预警', finishWarning: '完工预警',
jindu: '订单进度', jindu: '订单进度',
startCount: '开工数', startCount: '开工数',
stopCount: '暂停数', stopCount: '暂停数',
finishCount: '完工数', finishCount: '完工数',
remark: '备注', remark: '备注',
productingpreparationpeople: '车间', productingpreparationpeople: '车间',
detailId: '工序Id', detailId: '工序Id',
taskSeq: '工序号', taskSeq: '工序号',
detailName: '工序名称', detailName: '工序名称',
routingCode: '工艺文件编号', routingCode: '工艺文件编号',
userNames: '人员名称', userNames: '人员名称',
userIds: '', userIds: '',
routingHeaderId: '工艺规程id', routingHeaderId: '工艺规程id',
dispatchExecuteId: '工单执行表id' dispatchExecuteId: '工单执行表id'
}, },
order_pause: { order_pause: {
id: '', id: '',
creationTime: '暂停时间', creationTime: '暂停时间',
creatorUserId: '', creatorUserId: '',
creator: '暂停人', creator: '暂停人',
lastModificationTime: '恢复时间', lastModificationTime: '恢复时间',
lastModifierUserId: '', lastModifierUserId: '',
laster: '恢复人', laster: '恢复人',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
orderId: '订单id', orderId: '订单id',
mesCode: '订单编号', mesCode: '订单编号',
productId: '产品id', productId: '产品id',
productName: '产品名称', productName: '产品名称',
drawnNumber: '产品图号', drawnNumber: '产品图号',
pauseCause: '暂停原因', pauseCause: '暂停原因',
remark: '描述', remark: '描述',
path: '附件路径', path: '附件路径',
relatedPerson: '相关人员', relatedPerson: '相关人员',
relatedPersoner: '相关人员', relatedPersoner: '相关人员',
}, },
waitOpened: { waitOpened: {
id: '', id: '',
orderId: '订单主键', orderId: '订单主键',
serialNumber: '合格证编号', serialNumber: '合格证编号',
mesCode: '订单编号', mesCode: '订单编号',
drawnNumber: '图号', drawnNumber: '图号',
productId: '产品id', productId: '产品id',
productName: '产品名称', productName: '产品名称',
quantity: '计划数量', quantity: '计划数量',
productQuantity: '合格数量', productQuantity: '合格数量',
actualFinishDate: '完成时间', actualFinishDate: '完成时间',
productingPreparationPeople: '承制单位', productingPreparationPeople: '承制单位',
uncertificateQuantity: '待开具数量', uncertificateQuantity: '待开具数量',
status: '状态', status: '状态',
userUnit: '用户单位', userUnit: '用户单位',
taskBased: '任务依据', taskBased: '任务依据',
productCode: '产品代号(图号)', productCode: '产品代号(图号)',
productSerialNumber: '产品编号', productSerialNumber: '产品编号',
productStatus: '产品状态', productStatus: '产品状态',
materialCode: '原材料牌号', materialCode: '原材料牌号',
materialSerialNumber: '原材料批次号', materialSerialNumber: '原材料批次号',
addMaterialBatch: '增材制造批次号', addMaterialBatch: '增材制造批次号',
materialCertificationNumber: '原材合格证编号', materialCertificationNumber: '原材合格证编号',
conclusion: '结论', conclusion: '结论',
examUser: '检验员', examUser: '检验员',
approveUser: '批准人', approveUser: '批准人',
approveDate: '批准时间', approveDate: '批准时间',
remark: '备注', remark: '备注',
certificateId: '合格证主键', certificateId: '合格证主键',
name: '检验项目', name: '检验项目',
require: '检验要求', require: '检验要求',
result: '测试结果', result: '测试结果',
creationTime: '创建时间', creationTime: '创建时间',
examDate: '检验时间', examDate: '检验时间',
}, },
StoreroomLocation: { //库房库位 StoreroomLocation: { //库房库位
upId: '', upId: '',
materialType: '', materialType: '',
storeroomTiitle: '', storeroomTiitle: '',
storeroomId: '', storeroomId: '',
recommend: '', recommend: '',
status: '', status: '',
sizes: '', sizes: '',
levels: '', levels: '',
departmentType: '', departmentType: '',
userName: '', userName: '',
userIds: '', userIds: '',
title: '库位名称', title: '库位名称',
material_type: '所属资源', material_type: '所属资源',
department_name: '所属部门', department_name: '所属部门',
user_name: '库管员', user_name: '库管员',
description: '位置', description: '位置',
}, },
bug: { //bug bug: { //bug
id: 'ID', id: 'ID',
level: '级别', level: '级别',
title: '标题', title: '标题',
pagePath: '地址', pagePath: '地址',
status: '状态', status: '状态',
creationTime: '创建时间', creationTime: '创建时间',
createor: '创建人', createor: '创建人',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '处理时间', lastModificationTime: '处理时间',
auditUser: '处理人', auditUser: '处理人',
alloter: '指派给', alloter: '指派给',
lastModifierUserId: '处理人', lastModifierUserId: '处理人',
content: '内容', content: '内容',
remark: 'bug处理', remark: 'bug处理',
time: '工时', time: '工时',
actionName: '处理人', actionName: '处理人',
workHours: '工时', workHours: '工时',
}, },
DipartLocation: { DipartLocation: {
name: "部门", name: "部门",
organizationType: "组织类型", organizationType: "组织类型",
// status: '是否生产班组', // status: '是否生产班组',
status: '属性', status: '属性',
departcode: '部门编号', departcode: '部门编号',
department: '部门名称', department: '部门名称',
cityName: '省市县', cityName: '省市县',
creationTime: '创建时间', creationTime: '创建时间',
upMent: '上级部门', upMent: '上级部门',
code:'部门编号', code: '部门编号',
location:'省市县', location: '省市县',
parent_Id:'上级部门', parent_Id: '上级部门',
property:'属性', property: '属性',
parentTitle:'上级部门' parentTitle: '上级部门'
}, },
instance: { instance: {
id: '主键', id: '主键',
workflowStatus: '工作流状态', //处理中\1;审核通过\2;终止\3; workflowStatus: '工作流状态', //处理中\1;审核通过\2;终止\3;
instanceId: '流程Id', instanceId: '流程Id',
name: '名称', name: '名称',
status: '状态', //启用0;禁用1; status: '状态', //启用0;禁用1;
version: '版本', version: '版本',
processingStatus: '审核状态', processingStatus: '审核状态',
rejectStatus: '驳回状态', rejectStatus: '驳回状态',
endStatus: '完成状态', endStatus: '完成状态',
terminateStatus: '终止状态', terminateStatus: '终止状态',
creationTime: '创建时间', //记录创建时间 creationTime: '创建时间', //记录创建时间
creatorUserId: '创建人Id', creatorUserId: '创建人Id',
creator: "创建人", creator: "创建人",
baseDataUrl: '基础表单地址', baseDataUrl: '基础表单地址',
updateBaseStatusUrl: '更新状态地址', updateBaseStatusUrl: '更新状态地址',
}, },
form: { form: {
id: '', id: '',
formId: '对应表单主键', formId: '对应表单主键',
name: '表单名称', name: '表单名称',
status: '状态', status: '状态',
version: '版本', version: '版本',
creationTime: '创建时间', creationTime: '创建时间',
creator: "创建人", creator: "创建人",
creatorUserId: '创建人Id', creatorUserId: '创建人Id',
lastModificationTime: '处理时间', lastModificationTime: '处理时间',
lastModifierUserId: '处理人', lastModifierUserId: '处理人',
deleterUserId: '', deleterUserId: '',
deletionTime: '', deletionTime: '',
isDeleted: '', isDeleted: '',
}, },
form_column: { form_column: {
id: '', id: '',
formId: '表单主键', formId: '表单主键',
cnName: '中文名称', cnName: '中文名称',
enName: '英文名称', enName: '英文名称',
dataType: '数据类型', dataType: '数据类型',
dicSource: '', dicSource: '',
dataLength: '数据长度', dataLength: '数据长度',
required: '必填', required: '必填',
controlType: '控件类型', controlType: '控件类型',
dicSource: '字典项', dicSource: '字典项',
align: '对齐方式', align: '对齐方式',
remark: '备注', remark: '备注',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创造者的用户id', creatorUserId: '创造者的用户id',
lastModificationTime: '最后修改时间', lastModificationTime: '最后修改时间',
lastModifierUserId: '最后修改的用户id', lastModifierUserId: '最后修改的用户id',
isDeleted: '被删除', isDeleted: '被删除',
deleterUserId: '删除人的用户id', deleterUserId: '删除人的用户id',
deletionTime: '删除时间', deletionTime: '删除时间',
}, },
Message: { Message: {
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
title: '标题', title: '标题',
content: '内容', content: '内容',
state: '状态', state: '状态',
}, },
node: { node: {
id: '', id: '',
schemaId: '工作流Id', schemaId: '工作流Id',
formId: '表单', formId: '表单',
name: '节点名称', name: '节点名称',
operation: '审核类型', operation: '审核类型',
rejectOption: '驳回类型', rejectOption: '驳回类型',
category: '类别', category: '类别',
userIdList: "审批人", userIdList: "审批人",
roleIdList: "审批角色", roleIdList: "审批角色",
isFixed: "固定", isFixed: "固定",
// creationTime:'创建时间', // creationTime:'创建时间',
// creatorUserId:'创造者的用户id', // creatorUserId:'创造者的用户id',
// lastModificationTime:'最后修改时间', // lastModificationTime:'最后修改时间',
// lastModifierUserId:'最后修改的用户id', // lastModifierUserId:'最后修改的用户id',
// isDeleted:'被删除', // isDeleted:'被删除',
// deleterUserId:'删除人的用户id', // deleterUserId:'删除人的用户id',
// deletionTime:'删除时间', // deletionTime:'删除时间',
}, },
orderInfo: { //订单详细信息 orderInfo: { //订单详细信息
id: '', id: '',
orderId: '订单主键', orderId: '订单主键',
mesCode: '订单编号', mesCode: '订单编号',
drawnNumber: '图号', drawnNumber: '图号',
productId: '产品id', productId: '产品id',
productName: '产品名称', productName: '产品名称',
taskType: '任务类型', taskType: '任务类型',
quantity: '计划数量', quantity: '计划数量',
stage: '阶段', stage: '阶段',
quantity: '数量', quantity: '数量',
materialId: '材料', materialId: '材料',
routing_Method: '工艺方法', routing_Method: '工艺方法',
outer_Envelope_Size: '外包络尺寸', outer_Envelope_Size: '外包络尺寸',
demandStartDate: '开始时间', demandStartDate: '开始时间',
demandFinishDate: '完成时间', demandFinishDate: '完成时间',
qualifiedQuantity: '合格数量', qualifiedQuantity: '合格数量',
guestName: '甲方客户', guestName: '甲方客户',
printSupply: '3D打印承制单', printSupply: '3D打印承制单',
functionaryOffice: '厂内责任机关', functionaryOffice: '厂内责任机关',
mainDepartmentId: '厂内主体责任部门', mainDepartmentId: '厂内主体责任部门',
status: '状态', status: '状态',
taskInputDate: '任务输入日期', taskInputDate: '任务输入日期',
taskRequire: '任务节点要求', taskRequire: '任务节点要求',
putintDocmentCode: '甲方投产输入文件(编号)', putintDocmentCode: '甲方投产输入文件(编号)',
technologyDocmentCode: '甲方技术输入文件(编号)', technologyDocmentCode: '甲方技术输入文件(编号)',
outerDrawnNumber: '外部图号/模型号', outerDrawnNumber: '外部图号/模型号',
modelVersion: '模型版本', modelVersion: '模型版本',
taskCode: '甲方任务号', taskCode: '甲方任务号',
designer: '甲方设计人员', designer: '甲方设计人员',
officeFunctionary: '厂内机关负责人', officeFunctionary: '厂内机关负责人',
mainRoutingPeople: '厂内主工艺人员', mainRoutingPeople: '厂内主工艺人员',
remark: '备注', remark: '备注',
batchNumber: '批次号', batchNumber: '批次号',
projectNumber: '项目号', projectNumber: '项目号',
urgencyLevel: '紧急程度', urgencyLevel: '紧急程度',
}, },
materialInfo: { //料单送审详情 materialInfo: { //料单送审详情
id: '', id: '',
documentCode: '文档编号', documentCode: '文档编号',
platesNum: '板数', platesNum: '板数',
perBoard: '每板定额', perBoard: '每板定额',
powderName: '粉末名称', powderName: '粉末名称',
powderBrand: '粉末牌号', powderBrand: '粉末牌号',
powderSpec: '粉末规格', powderSpec: '粉末规格',
powderCategory: '粉末类别', powderCategory: '粉末类别',
powderTotal: '预估粉末总量', powderTotal: '预估粉末总量',
partHeight: '预估零件高度', partHeight: '预估零件高度',
PlacodeName: '基板名称', PlacodeName: '基板名称',
PlacodeBrand: '基板牌号', PlacodeBrand: '基板牌号',
PlacodeSpec: '基板规格', PlacodeSpec: '基板规格',
PlacodeDevice: '基板适用设备', PlacodeDevice: '基板适用设备',
Placodeland: '基板厚度下限', Placodeland: '基板厚度下限',
PlacodeTotal: '基板总量', PlacodeTotal: '基板总量',
ScraperSpec: '刮刀规格', ScraperSpec: '刮刀规格',
ScraperTotal: '刮刀数量', ScraperTotal: '刮刀数量',
remark: '备注' remark: '备注'
}, },
Unqualified: { Unqualified: {
unqualifiedCode: "审理单编号", unqualifiedCode: "审理单编号",
department: "申请部门", department: "申请部门",
customer: "客户名称", customer: "客户名称",
outsourcing: "外包供方名称", outsourcing: "外包供方名称",
product: "产品名称", product: "产品名称",
material: "材料牌号", material: "材料牌号",
quantity: "数量", quantity: "数量",
code: "代号", code: "代号",
problemDesc: "问题描述", problemDesc: "问题描述",
inspectionPerson: "检验员", inspectionPerson: "检验员",
inspectionDate: "检验日期", inspectionDate: "检验日期",
}, },
handleList: { //待办事宜 handleList: { //待办事宜
id: 'id', id: 'id',
schemaId: '审批类型Id', schemaId: '审批类型Id',
schemaName: '审批类型', schemaName: '审批类型',
code: '编号', code: '编号',
status: '状态', status: '状态',
startRecordId: '开始节点Id', startRecordId: '开始节点Id',
currentNodeId: '当前环节Id', currentNodeId: '当前环节Id',
currentNodeName: '当前环节', currentNodeName: '当前环节',
nextNodeId: '下一环节Id', nextNodeId: '下一环节Id',
nextNodeName: '下一环节', nextNodeName: '下一环节',
creatorUserId: '创建用户Id', creatorUserId: '创建用户Id',
creator: '创建人', creator: '创建人',
creationTime: '创建时间', creationTime: '创建时间',
}, },
processList: { //工艺规程列表 processList: { //工艺规程列表
id: 'id', id: 'id',
productName: '产品名称', productName: '产品名称',
name: '工艺名称', name: '工艺名称',
routingType: '', routingType: '',
routingTypeDesc: '工艺类型', routingTypeDesc: '工艺类型',
version: '文档版本', version: '文档版本',
code: '规程编号', code: '规程编号',
}, },
OrderDataReview: { //数据审查 OrderDataReview: { //数据审查
id: 'id', id: 'id',
code: '文件编号', code: '文件编号',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建用户Id', creatorUserId: '创建用户Id',
lastModificationTime: '最后修改时间', lastModificationTime: '最后修改时间',
lastModifierUserId: '最后修改人id', lastModifierUserId: '最后修改人id',
repair_file_name: '修复文件', repair_file_name: '修复文件',
repair_file_notes: '', repair_file_notes: '',
repair_file_status: '修复文件状态', repair_file_status: '修复文件状态',
repair_file_url: '修复文件地址', repair_file_url: '修复文件地址',
slicing_file_name: '切片文件', slicing_file_name: '切片文件',
slicing_file_notes: '', slicing_file_notes: '',
slicing_file_status: '切片文件状态', slicing_file_status: '切片文件状态',
slicing_file_url: '切片文件地址', slicing_file_url: '切片文件地址',
supporting_file_name: '支撑文件', supporting_file_name: '支撑文件',
supporting_file_url: "支撑文件地址", supporting_file_url: "支撑文件地址",
supporting_file_notes: '', supporting_file_notes: '',
supporting_file_status: '支撑文件状态', supporting_file_status: '支撑文件状态',
}, },
Customer: { //客户管理 Customer: { //客户管理
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
name: '客户名称', name: '客户名称',
abbre: '客户简称', abbre: '客户简称',
address: '邮政地址', address: '邮政地址',
principal: '负责人', principal: '负责人',
telephone: '办公电话', telephone: '办公电话',
mobile: '手机', mobile: '手机',
type: '客户类型', type: '客户类型',
area: '客户区域', area: '客户区域',
isInform: '是否报备', isInform: '是否报备',
status: '状态', status: '状态',
notes: '备注', notes: '备注',
code: '客户编码', code: '客户编码',
trade: '行业', trade: '行业',
}, },
Shop: { Shop: {
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
name: '组织名称', name: '组织名称',
upId: '上层组织id', upId: '上层组织id',
customerId: '客户id', customerId: '客户id',
principal: '负责人', principal: '负责人',
telephone: '办公电话', telephone: '办公电话',
mobile: '手机', mobile: '手机',
status: '状态', status: '状态',
notes: '备注', notes: '备注',
}, },
Project: { Project: {
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
name: '项目名称', name: '项目名称',
customerId: '客户Id', customerId: '客户Id',
shopId: '主管部门', shopId: '主管部门',
stage: '销售阶段', stage: '销售阶段',
principal: '负责人', principal: '负责人',
isInform: '是否报备', isInform: '是否报备',
status: '状态', status: '状态',
notes: '备注', notes: '备注',
budget: '预算(元)', budget: '预算(元)',
}, },
Follow: { Follow: {
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
projectId: '项目Id', projectId: '项目Id',
customerId: '客户Id', customerId: '客户Id',
userId: '销售人员Id', userId: '销售人员Id',
type: '跟进类型', type: '跟进类型',
time: '跟进时间', time: '跟进时间',
deliverable: '跟进交付物', deliverable: '跟进交付物',
arrange: '后续安排', arrange: '后续安排',
principal: '负责人', principal: '负责人',
status: '状态', status: '状态',
notes: '备注', notes: '备注',
accessory: '上传' accessory: '上传'
}, },
Contract: { Contract: {
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
projectId: '项目编号', projectId: '项目编号',
name: '名称', name: '名称',
accessory: '附件', accessory: '附件',
userId: '销售人员', userId: '销售人员',
proceeds: '已收款', proceeds: '已收款',
status: '状态', status: '状态',
notes: '备注', notes: '备注',
}, },
// 工厂日历 // 工厂日历
mes_shift_work_sched: { mes_shift_work_sched: {
id: '', id: '',
shiftWorkSchedCode: '班次编号', shiftWorkSchedCode: '班次编号',
shiftName: '班次名称', shiftName: '班次名称',
shiftStart: '班次开始时间', shiftStart: '班次开始时间',
shiftEnd: '班次结束时间', shiftEnd: '班次结束时间',
shiftStartEnd: '班次时间', shiftStartEnd: '班次时间',
status: '状态', status: '状态',
workingLong: '工作时长', workingLong: '工作时长',
shiftWorkSchedPk1: '班次id', shiftWorkSchedPk1: '班次id',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
}, },
calendar_holiday: { calendar_holiday: {
holidayId: "节假日编号", holidayId: "节假日编号",
holidayName: "节假日名称", holidayName: "节假日名称",
holidayTimeslot: "节假日时间段", holidayTimeslot: "节假日时间段",
holidayStart: "节假日开始日期", holidayStart: "节假日开始日期",
holidayEnd: "节假日结束日期", holidayEnd: "节假日结束日期",
creationTime: "创建时间", creationTime: "创建时间",
creatorUserId: '创建人', creatorUserId: '创建人',
id: '', id: '',
}, },
calendar_overtime: { calendar_overtime: {
id: '', id: '',
holidayCalId: "日历编号", holidayCalId: "日历编号",
holidayCalName: "日历名称", holidayCalName: "日历名称",
mesHolidayTitles: "关联节假日", mesHolidayTitles: "关联节假日",
mesHolidayIds: "关联节假日id", mesHolidayIds: "关联节假日id",
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
}, },
calendar_work: { calendar_work: {
id: '', id: '',
calId: "日历编号", calId: "日历编号",
calName: "日历名称", calName: "日历名称",
mesShiftWorkSchedIds: "关联班次id", mesShiftWorkSchedIds: "关联班次id",
shiftName: "关联班次名称", shiftName: "关联班次名称",
workingLong: "工作时长", workingLong: "工作时长",
creationTime: "创建时间", creationTime: "创建时间",
creatorUserId: "创建人", creatorUserId: "创建人",
}, },
Connector: { Connector: {
id: '', id: '',
creationTime: '', creationTime: '',
creatorUserId: '', creatorUserId: '',
lastModificationTime: '', lastModificationTime: '',
lastModifierUserId: '', lastModifierUserId: '',
isDeleted: '', isDeleted: '',
deletionTime: '', deletionTime: '',
deleterUserId: '', deleterUserId: '',
name: '人员名称', name: '人员名称',
shopId: '组织id', shopId: '组织id',
duties: '职务', duties: '职务',
telephone: '办公电话', telephone: '办公电话',
mobile: '手机', mobile: '手机',
status: '状态', status: '状态',
notes: '备注', notes: '备注',
customerId: '客户Id', customerId: '客户Id',
shopName: '组织名称', shopName: '组织名称',
}, },
mes_order: { mes_order: {
id: '', id: '',
upId: '父订单id', upId: '父订单id',
mesCode: '订单编号', mesCode: '订单编号',
taskType: '任务类型', taskType: '任务类型',
productId: '产品表主键', productId: '产品表主键',
stage: '阶段', stage: '阶段',
materialId: '材料表主键', materialId: '材料表主键',
quantity: '数量', quantity: '数量',
guestName: '甲方客户', guestName: '甲方客户',
printSupply: '3D打印承制单位', printSupply: '3D打印承制单位',
functionaryOffice: '厂内责任机关', functionaryOffice: '厂内责任机关',
mainDepartmentId: '厂内主主体责任部门', mainDepartmentId: '厂内主主体责任部门',
remark: '备注', remark: '备注',
taskInputDate: '创建日期', taskInputDate: '创建日期',
taskRequire: '任务接点要求', taskRequire: '任务接点要求',
putintDocmentCode: '上传文件名称', putintDocmentCode: '上传文件名称',
technologyDocmentCode: '上传文件名称', technologyDocmentCode: '上传文件名称',
outerDrawnNumber: '外部图号/模型号', outerDrawnNumber: '外部图号/模型号',
modelVersion: '模型版本', modelVersion: '模型版本',
taskCode: '甲方任务号', taskCode: '甲方任务号',
designer: '甲方设计人员', designer: '甲方设计人员',
officeFunctionary: '厂内机关负责人', officeFunctionary: '厂内机关负责人',
mainRoutingPeople: '厂内主工艺人员', mainRoutingPeople: '厂内主工艺人员',
status: '订单状态', status: '订单状态',
workHours: '工时', workHours: '工时',
printPeriod: '打印周期', printPeriod: '打印周期',
equipment: '设备', equipment: '设备',
materialWeight: '材料重量', materialWeight: '材料重量',
isSupportingFinish: '配套状态', //是否配套,0 未配套,1 已配套 isSupportingFinish: '配套状态', //是否配套,0 未配套,1 已配套
demandStartDate: '投料时间', demandStartDate: '投料时间',
demandFinishDate: '节点时间', demandFinishDate: '节点时间',
actualStartDate: '订单实际开始时间,实际为第一道工序的开始时间', actualStartDate: '订单实际开始时间,实际为第一道工序的开始时间',
actualFinishDate: '订单实际结束时间,实际为最后一道工序的结束时间', actualFinishDate: '订单实际结束时间,实际为最后一道工序的结束时间',
isDeleted: '是否被删除,0 : 否,1 是', isDeleted: '是否被删除,0 : 否,1 是',
creatorUserId: '记录创建人', creatorUserId: '记录创建人',
creationTime: '创建时间', creationTime: '创建时间',
lastModifierUserId: '修改人', lastModifierUserId: '修改人',
lastModificationTime: '修改时间', lastModificationTime: '修改时间',
orderQuotationStatus: '报价状态', orderQuotationStatus: '报价状态',
distributeMainRouting: '(派发)工艺人员', distributeMainRouting: '(派发)工艺人员',
mainRoutingFinishDate: '工艺完成时间', mainRoutingFinishDate: '工艺完成时间',
majorRoutingPeople: '专业工艺人员', majorRoutingPeople: '专业工艺人员',
majorRoutingFinishDate: '专业工艺完成时间', majorRoutingFinishDate: '专业工艺完成时间',
checkUpPeople: '校对人员', checkUpPeople: '校对人员',
checkUpFinishDate: '校对完成时间', checkUpFinishDate: '校对完成时间',
productingPreparationPeople: '生产准备人员', productingPreparationPeople: '生产准备人员',
productingPreparationFinishDate: '生产准备完成时间', productingPreparationFinishDate: '生产准备完成时间',
quotationPeople: '订单报价人员', quotationPeople: '订单报价人员',
quotationFinishDate: '订单报价完成时间', quotationFinishDate: '订单报价完成时间',
routingMethod: '工艺方法', routingMethod: '工艺方法',
outerEnvelopeSize: '外包络尺寸', outerEnvelopeSize: '外包络尺寸',
divideMark: '分解标记:1-已分解', //1-已分解 divideMark: '分解标记:1-已分解', //1-已分解
productCode: '产品序号', productCode: '产品序号',
productName: '产品名称', productName: '产品名称',
drawnNumber: '产品图号', drawnNumber: '产品图号',
qualifiedQuantity: '合格数量', qualifiedQuantity: '合格数量',
uncertificateQuantity: '待开具数量', uncertificateQuantity: '待开具数量',
mainRoutingSetStatus: '工艺状态', mainRoutingSetStatus: '工艺状态',
majorRoutingSetStatus: '', majorRoutingSetStatus: '',
materialBillSetStatus: '', materialBillSetStatus: '',
routingDataSetStatus: '', routingDataSetStatus: '',
rootId: '', rootId: '',
mainRoutingExecuteStatus: '', mainRoutingExecuteStatus: '',
majorRoutingExecuteStatus: '', majorRoutingExecuteStatus: '',
mainRoutingActualStartDate: '', mainRoutingActualStartDate: '',
mainRoutingActualFinishDate: '', mainRoutingActualFinishDate: '',
majorRoutingActualStartDate: '', majorRoutingActualStartDate: '',
majorRoutingActualFinishDate: '', majorRoutingActualFinishDate: '',
batchNumber: '批次号', batchNumber: '批次号',
projectNumber: '项目号', projectNumber: '项目号',
urgencyLevel: '紧急程度', urgencyLevel: '紧急程度',
materialName: '材料名称', materialName: '材料名称',
isPreschedule: '移入排产', isPreschedule: '移入排产',
spareQty: '(APS)备件数量', spareQty: '(APS)备件数量',
demandStart: '(APS)投料时间', demandStart: '(APS)投料时间',
demandFinish: '(APS)节点时间', demandFinish: '(APS)节点时间',
partNamePro: '(APS)产品名称增强', partNamePro: '(APS)产品名称增强',
selection: '多选', selection: '多选',
DistributeMainRouting: '工艺人员', DistributeMainRouting: '工艺人员',
MainRoutingFinishDate: '完成时间', MainRoutingFinishDate: '完成时间',
}, },
mes_part_task_plan_simulate: { mes_part_task_plan_simulate: {
id: '', id: '',
part_task_pk: '计划编号', part_task_pk: '计划编号',
priority: '优先级', priority: '优先级',
plan_qty: '排产数量', plan_qty: '排产数量',
spare_qty: '', spare_qty: '',
plan_start: '计划排产开始', plan_start: '计划排产开始',
plan_finish: '计划排产结束', plan_finish: '计划排产结束',
notes: '备注', notes: '备注',
demand_start: '计划要求开始', demand_start: '计划要求开始',
demand_finish: '计划要求结束', demand_finish: '计划要求结束',
insert_flag: '插单', insert_flag: '插单',
badjustflag: '', badjustflag: '',
}, //多租户-服务器数据源 }, //多租户-服务器数据源
host: { host: {
id: '', id: '',
name: '数据源名称', name: '数据源名称',
ip: '服务器地址', ip: '服务器地址',
user: '用户名', user: '用户名',
password: '密码', password: '密码',
port: 'ssh端口', port: 'ssh端口',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '是否删除', isDeleted: '是否删除',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
}, //多租户-公司 }, //多租户-公司
tanant: { tanant: {
id: '', id: '',
name: '公司名称', name: '公司名称',
code: '公司编码', code: '公司编码',
typeId: '公司类型', typeId: '公司类型',
startTime: '服务开始时间', startTime: '服务开始时间',
endTime: '服务结束时间', endTime: '服务结束时间',
initialized: '是否已初始化', initialized: '是否已初始化',
dataSourceId: '数据源', dataSourceId: '数据源',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '是否删除', isDeleted: '是否删除',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
hostId: '服务器', hostId: '服务器',
}, },
data_source: { data_source: {
id: '', id: '',
hostId: '数据源ID', hostId: '数据源ID',
port: '端口', port: '端口',
userName: '用户名', userName: '用户名',
password: '密码', password: '密码',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '是否删除', isDeleted: '是否删除',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
}, },
mes_part_task_execute: { //排产方案的 mes_part_task_execute: { //排产方案的
pARTTASKPK: '', pARTTASKPK: '',
cLASSID: '产品Id', cLASSID: '产品Id',
pARTID: '产品Id', pARTID: '产品Id',
oRDERID: '', oRDERID: '',
pARTTASKID: '计划Id', pARTTASKID: '计划Id',
bATCHNUM: '批次号', bATCHNUM: '批次号',
pLANSTART: '计划排产开始', pLANSTART: '计划排产开始',
pLANFINISH: '计划排产结束', pLANFINISH: '计划排产结束',
aCTUALSTART: '', aCTUALSTART: '',
aCTUALFINISH: '', aCTUALFINISH: '',
dEMANDSTART: '要求开始时间', dEMANDSTART: '要求开始时间',
dEMANDFINISH: '要求结束时间', dEMANDFINISH: '要求结束时间',
pLANQTY: '计划数量', pLANQTY: '计划数量',
sPAREQTY: '', sPAREQTY: '',
pRODUCEDQTY: '', pRODUCEDQTY: '',
pASSEDQTY: '', pASSEDQTY: '',
sCRAPPEDQTY: '', sCRAPPEDQTY: '',
rEWORKQTY: '', rEWORKQTY: '',
tASKTYPE: '任务类型', tASKTYPE: '任务类型',
iNSERTFLAG: '插单', iNSERTFLAG: '插单',
tASKFLAG: '', tASKFLAG: '',
sTATUS: '状态', sTATUS: '状态',
nOTES: '', nOTES: '',
lOCKFLAG: '', lOCKFLAG: '',
sCHEDULEID: '排产方案', sCHEDULEID: '排产方案',
}, },
mes_op_task_execute: { //子表 mes_op_task_execute: { //子表
iD: '', iD: '',
oPTASKPK: '工单Id', oPTASKPK: '工单Id',
pARTTASKPK: '计划Id', pARTTASKPK: '计划Id',
tASKSEQ: '工序号', tASKSEQ: '工序号',
tASKNAME: '工序名称', tASKNAME: '工序名称',
pLANFINISH: '计划排产结束', pLANFINISH: '计划排产结束',
pLANSTART: '计划排产开始', pLANSTART: '计划排产开始',
aCTUALFINISH: '', aCTUALFINISH: '',
aCTUALSTART: '', aCTUALSTART: '',
sHOPID: '车间Id', sHOPID: '车间Id',
eQUIPID: '设备编号', eQUIPID: '设备编号',
eQUIPTYPE: '设备类型', eQUIPTYPE: '设备类型',
sINGLEOUT: '单间产出', sINGLEOUT: '单间产出',
rUNTIME: '单件工时', rUNTIME: '单件工时',
sETUPTIME: '准备工时', sETUPTIME: '准备工时',
pUTINTOQTY: '投产数量', pUTINTOQTY: '投产数量',
tRANSPORTTIME: '转运工时', tRANSPORTTIME: '转运工时',
cHECKTIME: '检验工时', cHECKTIME: '检验工时',
dISPATCHQTY: '派工数量', dISPATCHQTY: '派工数量',
pRODUCEDQTY: '', pRODUCEDQTY: '',
pASSEDQTY: '', pASSEDQTY: '',
sCRAPPEDQTY: '', sCRAPPEDQTY: '',
rEWORKQTY: '', rEWORKQTY: '',
tASKTYPE: '任务类型', tASKTYPE: '任务类型',
tASKFLAG: '', tASKFLAG: '',
iNSERTFLAG: '插单', iNSERTFLAG: '插单',
sTATUS: '状态', sTATUS: '状态',
nOTES: '备注', nOTES: '备注',
lOCKFLAG: '', lOCKFLAG: '',
routingHEADERID: '工艺规程Id', routingHEADERID: '工艺规程Id',
rOUTINGDETAILID: '工序Id', rOUTINGDETAILID: '工序Id',
isSynchronization: '', isSynchronization: '',
outsideTime: '外协时间', outsideTime: '外协时间',
sCHEDULEID: '排产方案编号', sCHEDULEID: '排产方案编号',
}, },
mes_op_task_plan_simulate: { //参数设置的表 mes_op_task_plan_simulate: { //参数设置的表
id: '', id: '',
op_task_pk: '工单编号', op_task_pk: '工单编号',
part_task_pk: '计划编号', part_task_pk: '计划编号',
task_seq: '工序号', task_seq: '工序号',
task_name: '工序名称', task_name: '工序名称',
put_into_qty: '投产数量', put_into_qty: '投产数量',
plan_start: '计划排产开始', plan_start: '计划排产开始',
plan_finish: '计划排产结束', plan_finish: '计划排产结束',
setup_time: '准备工时', setup_time: '准备工时',
run_time: '单件工时', run_time: '单件工时',
transport_time: '转运时间', transport_time: '转运时间',
check_time: '检验时间', check_time: '检验时间',
efficiency_value: '效率系数', efficiency_value: '效率系数',
singleout: '单件产出', singleout: '单件产出',
first_equip: '设备编号', first_equip: '设备编号',
equip_type: '设备类型', equip_type: '设备类型',
cal_id: '连班策略', cal_id: '连班策略',
machine_rule: '设备优先规则', machine_rule: '设备优先规则',
plan_method: '重叠转序', plan_method: '重叠转序',
over_time: '六日加班', over_time: '六日加班',
isdiscrete: '是否离散', isdiscrete: '是否离散',
discrete_value: '离散值', discrete_value: '离散值',
multi_machine: '多台分配', multi_machine: '多台分配',
notes: '备注', notes: '备注',
insert_flag: '插单', insert_flag: '插单',
outside_time: '外协时间', outside_time: '外协时间',
discrete_percent: '离散百分比%', discrete_percent: '离散百分比%',
taskseq_des: '', taskseq_des: '',
workshopcode: '', workshopcode: '',
routing_detail_id: '', routing_detail_id: '',
routing_header_id: '', routing_header_id: '',
comb_param: '', comb_param: '',
rule_qty: '', rule_qty: '',
}, },
routing_detail: { routing_detail: {
id: '', id: '',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '修改时间', lastModificationTime: '修改时间',
lastModifierUserId: '修改人', lastModifierUserId: '修改人',
isDeleted: '是否删除', isDeleted: '是否删除',
deleterUserId: '删除人', deleterUserId: '删除人',
deletionTime: '删除时间', deletionTime: '删除时间',
classId: '', classId: '',
routingHeaderId: '工艺ID', routingHeaderId: '工艺ID',
name: '工序名', name: '工序名',
taskSeq: '工序号', taskSeq: '工序号',
description: '工序名称详细描述', description: '工序名称详细描述',
taskContent: '工序内容', taskContent: '工序内容',
resourceId: '设备', resourceId: '设备',
resourceType: '设备类型', resourceType: '设备类型',
runtime: '单件排产工时', runtime: '单件排产工时',
setupTime: '工序准备工时', setupTime: '工序准备工时',
transportTime: '转运工时', transportTime: '转运工时',
checkTime: '检验工时', checkTime: '检验工时',
checkFlag: '检验标识', checkFlag: '检验标识',
efficiencyValue: '效率系数', efficiencyValue: '效率系数',
singleOut: '单件产出', singleOut: '单件产出',
isOutside: '是否外协', isOutside: '是否外协',
departmentId: '工序的承制单位', departmentId: '工序的承制单位',
isImportant: '是否关键工序', isImportant: '是否关键工序',
milestoneId: '里程碑', milestoneId: '里程碑',
phaseId: '阶段', phaseId: '阶段',
status: '状态', status: '状态',
remark: '备注', remark: '备注',
extend: '扩展字段', extend: '扩展字段',
outsideTime: '外协工期', outsideTime: '外协工期',
}, },
RoutingSupporting: { RoutingSupporting: {
id: '', id: '',
routingHeaderId: '工艺规程ID', routingHeaderId: '工艺规程ID',
routingHeaderId: '工艺规程ID', routingHeaderId: '工艺规程ID',
routingDetailId: '工序ID', routingDetailId: '工序ID',
routingStepId: '工步ID', routingStepId: '工步ID',
isDeleted: '删除人', isDeleted: '删除人',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
routingHeaderId: '工艺规程ID', routingHeaderId: '工艺规程ID',
routingDetailId: '工序ID', routingDetailId: '工序ID',
routingStepId: '工步ID', routingStepId: '工步ID',
quantity: '数量', quantity: '数量',
materialId: '物料id', materialId: '物料id',
materialType: '物料类型', materialType: '物料类型',
materialNumber: '物料编号', materialNumber: '物料编号',
nameMaterial: '物料名称', nameMaterial: '物料名称',
state: '状态', state: '状态',
extend: '扩展字段', extend: '扩展字段',
remark: '备注', remark: '备注',
brand: '牌号', brand: '牌号',
specifications: '规格', specifications: '规格',
xhgg: '型号规格', xhgg: '型号规格',
texture: '材质', texture: '材质',
procurementStandards: '采购标准', procurementStandards: '采购标准',
qualityGrade: '质量等级', qualityGrade: '质量等级',
state: '状态', state: '状态',
extend: '扩展字段', extend: '扩展字段',
remark: '备注', remark: '备注',
}, },
routing_step: { routing_step: {
id: '', id: '',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '修改时间', lastModificationTime: '修改时间',
lastModifierUserId: '修改人', lastModifierUserId: '修改人',
isDeleted: '是否删除', isDeleted: '是否删除',
deleterUserId: '删除人', deleterUserId: '删除人',
deletionTime: '删除时间', deletionTime: '删除时间',
routingHeaderId: '工艺', routingHeaderId: '工艺',
routingDetailId: '工序', routingDetailId: '工序',
classId: '', classId: '',
stepSeq: '工步号', stepSeq: '工步号',
name: '名称', name: '名称',
description: '描述', description: '描述',
status: '状态', status: '状态',
remark: '备注', remark: '备注',
stepContent: '工步内容', stepContent: '工步内容',
extend: '扩展字段', extend: '扩展字段',
}, },
routing_qc_card: { routing_qc_card: {
id: '', id: '',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '修改时间', lastModificationTime: '修改时间',
lastModifierUserId: '修改人', lastModifierUserId: '修改人',
isDeleted: '是否删除', isDeleted: '是否删除',
deleterUserId: '删除人', deleterUserId: '删除人',
deletionTime: '删除时间', deletionTime: '删除时间',
routingHeaderId: '工艺', routingHeaderId: '工艺',
routingDetailId: '工序', routingDetailId: '工序',
routingStepId: '工步', routingStepId: '工步',
checkContent: '检验内容', checkContent: '检验内容',
checkType: '检验标记', checkType: '检验标记',
checkParams: '参数名称', checkParams: '参数名称',
measurementUnit: '单位', measurementUnit: '单位',
fillintype: '汇报类型', fillintype: '汇报类型',
qualityTemplate: '模板', qualityTemplate: '模板',
isphotograph: '是否拍照', isphotograph: '是否拍照',
status: '状态', status: '状态',
extend: '扩展字段', extend: '扩展字段',
remark: '备注', remark: '备注',
productionRequirement: '生产要求', productionRequirement: '生产要求',
standard: '标准指标', standard: '标准指标',
qualityTemplateName: '模板文件名称', qualityTemplateName: '模板文件名称',
}, },
run_log: { run_log: {
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '删除人', isDeleted: '删除人',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
timestamp: '时间', timestamp: '时间',
level: '级别', level: '级别',
messageTemplate: '模板', messageTemplate: '模板',
renderedMessage: '异常信息', renderedMessage: '异常信息',
clientIpAddress: 'IP', clientIpAddress: 'IP',
loginName: '账号', loginName: '账号',
tanentCode: '租户', tanentCode: '租户',
host: '主机IP', host: '主机IP',
status: '状态', status: '状态',
requestUrl: '服务地址', requestUrl: '服务地址',
requestParam: '参数', requestParam: '参数',
exception: '异常详细信息', exception: '异常详细信息',
remark:'备注' remark: '备注'
}, },
user_message_config: { user_message_config: {
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
lastModifierUserId: '更新人', lastModifierUserId: '更新人',
isDeleted: '删除人', isDeleted: '删除人',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
categoryName: '名称', categoryName: '名称',
roleIds: '角色Id', roleIds: '角色Id',
userIds: '用户Id', userIds: '用户Id',
isInner: '是否发送站内消息', isInner: '是否发送站内消息',
isEmail: '是否发送邮件消息', isEmail: '是否发送邮件消息',
roles: '角色', roles: '角色',
users: '用户', users: '用户',
status: '启用状态', status: '启用状态',
code: '编码', code: '编码',
template: '模板', template: '模板',
title:'标题', title: '标题',
departmentIds: '部门Id', departmentIds: '部门Id',
departments: '部门', departments: '部门',
color:'颜色', color: '颜色',
icon:'图标', icon: '图标',
} },
} cache_config: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
code: '编码',
name: '名称',
describe: '描述',
duration: '缓存时长',
strategy: '策略',
type: '类型',
state: '状态',
size: '数据长度',
}
}
\ No newline at end of file
import Api from '@/plugins/request'
export default {
//10010修改密码
authChangepassword(params) {
return Api.post(`${UserUrl}/api/services/app/account/changepassword`, params);
},
}
\ No newline at end of file
<template>
<div>
<Row>
<Col span="24">
<Card class="updatePass">
<p slot="title">修改密码</p>
<p class="rowWaring mt">
<Alert type="warning">
<template slot="desc"> 密码过于简单,请重新设置密码! </template>
</Alert>
</p>
<p class="mt">用户帐号:{{ userInfo.userName }}</p>
<Form
ref="formCustom"
:model="formCustom"
:rules="ruleCustom"
:label-width="95"
>
<Row>
<Col span="6">
<FormItem label="原密码:" prop="oldpass">
<Input
type="password"
v-model="formCustom.oldpass"
size="large"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col span="6" class="container">
<FormItem label="新密码:" prop="passwd">
<Input
type="password"
v-model="formCustom.passwd"
size="large"
></Input>
</FormItem>
<div class="input_span">
<label style="margin-left: 40px">强度:</label>
<span id="one"></span>
<span id="two"></span>
<span id="three"></span>
</div>
<div id="font">
<span></span>
<span></span>
<span></span>
</div>
</Col>
</Row>
<Row>
<Col span="6">
<FormItem label="确认密码:" prop="passwdCheck">
<Input
size="large"
type="password"
v-model="formCustom.passwdCheck"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit('formCustom')"
>确认</Button
>
<Button
@click="handleReset('formCustom')"
style="margin-left: 8px"
>取消</Button
>
</FormItem>
</Form>
</Card>
</Col>
</Row>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
const validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入密码!"));
} else {
if (this.formCustom.passwdCheck !== "") {
//对第二个密码框单独验证
this.$refs.formCustom.validateField("passwdCheck");
}
callback();
}
};
const validatePassCheck = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入密码!"));
} else if (value !== this.formCustom.passwd) {
callback(new Error("两次输入不一致请重新输入!"));
} else {
callback();
}
};
const validateold = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入原密码!"));
} else {
callback();
}
};
return {
userInfo: {
accountId: "",
id: "",
userName: "",
},
msgText: "",
formCustom: {
passwd: "",
passwdCheck: "",
oldpass: "",
},
ruleCustom: {
passwd: [{ validator: validatePass, trigger: "blur", required: true }],
passwdCheck: [
{ validator: validatePassCheck, trigger: "blur", required: true },
],
oldpass: [{ validator: validateold, trigger: "blur", required: true }],
},
};
},
watch: {
"formCustom.passwd"(newname, oldname) {
this.msgText = this.checkStrong(newname);
if (this.msgText > 1 || this.msgText == 1) {
document.getElementById("one").style.background = "red";
} else {
document.getElementById("one").style.background = "#eee";
}
if (this.msgText > 2 || this.msgText == 2) {
document.getElementById("two").style.background = "orange";
} else {
document.getElementById("two").style.background = "#eee";
}
if (this.msgText == 4) {
document.getElementById("three").style.background = "#00D1B2";
} else {
document.getElementById("three").style.background = "#eee";
}
},
// deep: true,
},
created() {
this.userId = this.$store.state.userInfo.userId;
},
mounted() {
this.initUserInfo();
},
methods: {
//获取用户基本信息
initUserInfo() {
let parma = {
Id: this.userId,
};
this.$http.sysUser.getuserinfo(parma).then((res) => {
if (res.result) {
this.$nextTick(function () {
this.userInfo = res.result;
});
} else {
this.$Message.error("查询失败!");
}
});
},
checkStrong(sValue) {
var modes = 0;
//正则表达式验证符合要求的
if (sValue.length < 1) return modes;
if (/\d/.test(sValue)) modes++; //数字
if (/[a-z]/.test(sValue)) modes++; //小写
if (/[A-Z]/.test(sValue)) modes++; //大写
if (/\W/.test(sValue)) modes++; //特殊字符
//逻辑处理
switch (modes) {
case 1:
return 1;
break;
case 2:
return 2;
break;
case 3:
case 4:
return sValue.length < 4 ? 3 : 4;
break;
}
return modes;
},
handleSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
if(this.msgText < 2 ){
this.$Message.warning("密码过于简单,请重新设置密码!");
return;
}
let params = {
accountId: this.userInfo.accountId,
userId: this.userInfo.id,
newPassword: this.formCustom.passwdCheck,
oldPassword: this.formCustom.oldpass,
};
Api.authChangepassword(params).then((res) => {
if (res.success) {
this.$router.push("/");
this.$Message.success("修改成功!");
} else {
this.$Message.error("修改失败!");
}
});
}
});
},
handleReset(name) {
this.$refs[name].resetFields();
},
},
};
</script>
<style lang="less" scoped>
.updatePass .mt {
margin: 20px 0;
text-indent: 7px;
}
.input_span span {
display: inline-block;
width: 85px;
height: 10px;
background: #eee;
line-height: 20px;
}
#one {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
border-right: 0px solid;
margin-left: 10px;
margin-right: 3px;
}
#two {
border-left: 0px solid;
border-right: 0px solid;
margin-left: -5px;
margin-right: 3px;
}
#three {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-left: 0px solid;
margin-left: -5px;
}
#font {
margin-bottom: 20px;
}
#font span:nth-child(1) {
color: red;
margin-left:100px;
}
#font span:nth-child(2) {
color: orange;
margin: 0 60px;
}
#font span:nth-child(3) {
color: #00d1b2;
}
</style>
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12"
><FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"> </Input> </FormItem></Col>
<Col :span="12"
><FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"> </Input> </FormItem></Col>
<Col :span="12"
><FormItem :label="l('duration')" prop="duration">
<InputNumber v-model="entity.duration" ></InputNumber> </FormItem>
</Col>
<Col :span="12"
><FormItem :label="l('strategy')" prop="strategy">
<Dictionary
code="mes.cache_config.Strategy"
v-model="entity.strategy"
></Dictionary> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('type')" prop="type">
<Dictionary
code="mes.cache_config.Type"
v-model="entity.type"
></Dictionary> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('state')" prop="state">
<Dictionary
code="mes.cache_config.State"
v-model="entity.state"
></Dictionary> </FormItem
></Col>
<Col :span="24"
><FormItem :label="l('describe')" prop="describe">
<Input
v-model="entity.describe"
type="textarea"
:rows="5"
></Input> </FormItem
></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled"
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
disabled: false,
entity: {
code: "",
name: "",
describe: "",
duration: 0,
strategy: 0,
type: 0,
state: 0,
},
rules: {
code: [{ required: true, message: "必填", trigger: "blur" }],
name: [{ required: true, message: "必填", trigger: "blur" }],
duration: [{ required: true, message: "必填", trigger: "blur",type:"number" }],
},
};
},
props: {
v: Object,
eid: Number,
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.create(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "cache_config" + "." + key;
return this.$t(key);
},
},
watch: {
v() {
this.entity = this.$u.clone(this.v);
},
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
import Api from '@/plugins/request'
export default {
index: `${systemUrl}/cacheconfig/paged`,
paged(params) {
return Api.post(`${systemUrl}/cacheconfig/paged`, params);
},
get(params) {
return Api.get(`${systemUrl}/cacheconfig/get`, params);
},
create(params) {
return Api.post(`${systemUrl}/cacheconfig/create`, params);
},
update(params) {
return Api.post(`${systemUrl}/cacheconfig/update`, params);
},
delete(id) {
return Api.delete(`${systemUrl}/cacheconfig/delete`, { params: { id: id } });
},
deletes(params) {
return Api.post(`${systemUrl}/cacheconfig/batchdelete`, params);
},
clears(id) {
return Api.post(`${systemUrl}/cacheconfig/clear`, { "id": id });
},
allClears(params) {
return Api.post(`${systemUrl}/cacheconfig/batchclearcache`, params);
}
}
\ No newline at end of file
<template>
<div class="detail">
<Row>
<!-- <Filed :span="12" :name="l('creationTime')">{{
entity.creationTime
}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{
entity.creatorUserId
}}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{
entity.lastModificationTime
}}</Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{
entity.lastModifierUserId
}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{ entity.isDeleted }}</Filed>
<Filed :span="12" :name="l('deletionTime')">{{
entity.deletionTime
}}</Filed>
<Filed :span="12" :name="l('deleterUserId')">{{
entity.deleterUserId
}}</Filed> -->
<Filed :span="12" :name="l('code')">{{ entity.code }}</Filed>
<Filed :span="12" :name="l('name')">{{ entity.name }}</Filed>
<Filed :span="12" :name="l('duration')">{{ entity.duration }}</Filed>
<Filed :span="12" :name="l('strategy')">
<State code="mes.cache_config.Strategy" :value="entity.strategy" />
</Filed>
<Filed :span="12" :name="l('type')">
<State code="mes.cache_config.Type" :value="entity.type" />
</Filed>
<Filed :span="12" :name="l('state')">
<State code="mes.cache_config.State" :value="entity.state" />
</Filed>
<Filed :span="24" :name="l('size')">
{{ entity.size }}
<Button type="error" v-if="entity.size > 0" @click="clears(entity.id)"
>清理缓存</Button
>
</Filed>
<Filed :span="24" :name="l('describe')">{{ entity.describe }}</Filed>
</Row>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
eid: Number,
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "cache_config" + "." + key;
return this.$t(key);
},
clears(id) {
this.$Modal.confirm({
title: "确认",
content: "确认要清理缓存吗?",
onOk: () => {
Api.clears(id).then((r) => {
if (r.success) {
this.$Message.success("缓存已清除");
}
});
},
});
},
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12"
><FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('duration')" prop="duration">
<InputNumber v-model="entity.duration"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('strategy')" prop="strategy">
<Dictionary
code="mes.cache_config.Strategy"
v-model="entity.strategy"
></Dictionary> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('type')" prop="type">
<Dictionary
code="mes.cache_config.Type"
v-model="entity.type"
></Dictionary> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('state')" prop="state">
<Dictionary
code="mes.cache_config.State"
v-model="entity.state"
></Dictionary> </FormItem
></Col>
<Col :span="24"
><FormItem :label="l('describe')" prop="describe">
<Input
v-model="entity.describe"
type="textarea"
:rows="5"
></Input> </FormItem
></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled"
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {},
rules: {
code: [{ required: true, message: "必填", trigger: "blur" }],
name: [{ required: true, message: "必填", trigger: "blur" }],
duration: [{ required: true, message: "必填", trigger: "blur",type:"number" }],
},
};
},
props: {
eid: Number,
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
});
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "cache_config" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
<template>
<div>
<DataGrid
:columns="columns"
ref="grid"
:action="action"
@on-selection-change="selectInfo"
><template slot="easySearch"
><Form ref="formInline" :model="easySearch" inline
><FormItem prop="keys"
><Input
placeholder="请输入关键字名称"
v-model="easySearch.keys.value"
/>
</FormItem>
<FormItem
><Button type="primary" @click="search">查询</Button></FormItem
>
</Form></template
>
<template slot="searchForm">
<Search />
</template>
<template slot="batch">
<Button type="primary" @click="allClear">批量清理</Button>
<Button type="error" @click="inSure">批量删除</Button>
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
export default {
name: "list",
components: {
Search,
},
head: {
title: "",
author: "henq",
description: "cache_config 10/9/2020 2:37:46 PM",
},
data() {
return {
results: [],
selectList: [],
action: Api.index,
easySearch: {
keys: { op: "name", value: null },
},
modal: false,
title: "新增",
detail: null,
curId: 0,
columns: [
{
key: "id",
title: this.$t("id"),
hide: true,
align: "left",
high: true,
},
{
key: "selection",
title: "多选",
width: 60,
align: "center",
type: "selection",
},
{
key: "name",
title: this.l("name"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h(
"op",
{
attrs: {
oprate: "detail",
},
on: {
click: () => this.view(params.row.id),
},
},
params.row.name
);
},
},
{
key: "state",
title: this.l("state"),
align: "left",
high: true,
code: "mes.cache_config.State",
},
{ key: "code", title: this.l("code"), align: "left", high: true },
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
},
// {
// key: "lastModificationTime",
// title: this.l("lastModificationTime"),
// align: "left",
// high: true,
// },
// {
// key: "lastModifierUserId",
// title: this.l("lastModifierUserId"),
// align: "left",
// high: true,
// },
// {
// key: "isDeleted",
// title: this.l("isDeleted"),
// align: "left",
// high: true,
// },
// {
// key: "deletionTime",
// title: this.l("deletionTime"),
// align: "left",
// high: true,
// },
// {
// key: "deleterUserId",
// title: this.l("deleterUserId"),
// align: "left",
// high: true,
// },
{
key: "duration",
title: this.l("duration"),
align: "left",
high: true,
},
{
key: "strategy",
title: this.l("strategy"),
align: "left",
high: true,
code: "mes.cache_config.Strategy",
},
{
key: "type",
title: this.l("type"),
align: "left",
high: true,
code: "mes.cache_config.Type",
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true,
},
{
title: "操作",
key: "action",
width: 170,
align: "right",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) },
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) },
},
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete", msg: "确认要清理缓存吗?" },
on: { click: () => this.clears(params.row.id) },
},
"清理"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) },
},
"删除"
),
]);
},
},
],
};
},
mounted() {
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
// copy(id) {
// this.curId = id;
// this.title = "克隆";
// this.detail = () => import("./add");
// this.modal = true;
// },
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
clears(id) {
Api.clears(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("缓存已清除");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
/*
cache_config:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
key:'键',
name:'名称',
describe:'描述',
duration:'缓存时长',
strategy:'策略',
type:'类型',
state:'状态',
}
*/
let vkey = "cache_config" + "." + key;
return this.$t(vkey) || key;
},
selectInfo(value) {
this.selectList = [];
this.selectList = value;
let statueArry = [];
value.forEach((data) => {
var that = this;
statueArry.push(data.id);
});
this.results = [];
this.results = statueArry;
},
inSure() {
this.$Modal.confirm({
title: "确认",
content: "是否确认批量删除?",
onOk: () => {
Api.deletes(this.results).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$refs.grid.selectAll(false);
this.$Message.success("删除成功");
}
});
},
});
},
allClear() {
this.$Modal.confirm({
title: "确认",
content: "是否确认批量清除数据?",
onOk: () => {
Api.allClears(this.results).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$refs.grid.selectAll(false);
this.$Message.success("缓存已清除");
}
});
},
});
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show"
><FormItem :label="$t('id')" prop="id">
<Input v-model="condition.id.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.creationTime.show"
><FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker
type="daterange"
v-model="condition.creationTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.creatorUserId.show"
><FormItem :label="l('creatorUserId')" prop="creatorUserId">
<Input v-model="condition.creatorUserId.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.lastModificationTime.show"
><FormItem
:label="l('lastModificationTime')"
prop="lastModificationTime"
>
<DatePicker
type="daterange"
v-model="condition.lastModificationTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show"
><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<Input v-model="condition.lastModifierUserId.value">
</Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.deletionTime.show"
><FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker
type="daterange"
v-model="condition.deletionTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.key.show"
><FormItem :label="l('code')" prop="code">
<Input v-model="condition.code.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.name.show"
><FormItem :label="l('name')" prop="name">
<Input v-model="condition.name.value"> </Input> </FormItem
></Col>
<Col :span="24" :v-if="condition.describe.show"
><FormItem :label="l('describe')" prop="describe">
<Input v-model="condition.describe.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.duration.show"
><FormItem :label="l('duration')" prop="duration">
<Input v-model="condition.duration.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.strategy.show"
><FormItem :label="l('strategy')" prop="strategy">
<Dictionary
code="mes.cache_config.Strategy"
v-model="condition.strategy.value"
></Dictionary> </FormItem
></Col>
<Col :span="12" :v-if="condition.type.show"
><FormItem :label="l('type')" prop="type">
<Dictionary
code="mes.cache_config.Type"
v-model="condition.type.value"
></Dictionary> </FormItem
></Col>
<Col :span="12" :v-if="condition.state.show"
><FormItem :label="l('state')" prop="state">
<Dictionary
code="mes.cache_config.State"
v-model="condition.state.value"
></Dictionary> </FormItem
></Col>
</Row>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
condition: {
id: { op: "Equal", value: null, show: true },
creationTime: { op: "Range", value: null, show: true },
creatorUserId: { op: "Equal", value: null, show: true },
lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime: { op: "Range", value: null, show: true },
code: { op: "Equal", value: null, show: true },
name: { op: "Equal", value: null, show: true },
describe: { op: "Equal", value: null, show: true },
duration: { op: "Equal", value: null, show: true },
strategy: { op: "Equal", value: null, show: true },
type: { op: "Equal", value: null, show: true },
state: { op: "Equal", value: null, show: true },
},
};
},
methods: {
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "cache_config" + "." + key;
return this.$t(key);
},
},
};
</script>
\ No newline at end of file
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
<Input v-model="entity.shiftName"></Input> <Input v-model="entity.shiftName"></Input>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="24"> <Col :span="24">
<FormItem :label="l('shiftStartEnd')" prop="shiftStartEnd"> <FormItem :label="l('shiftStartEnd')" prop="shiftStartEnd">
<TimePicker format="HH:mm" v-model="entity.shiftStartEnd" type="timerange" placeholder="选择时间段" style="width: 130px"></TimePicker> <TimePicker format="HH:mm" v-model="entity.shiftStartEnd" type="timerange" placeholder="选择时间段" style="width: 130px"></TimePicker>
</FormItem> </FormItem>
</Col> --> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('shiftStart')" prop="shiftStart"> <FormItem :label="l('shiftStart')" prop="shiftStart">
<TimePicker format="HH:mm" v-model="entity.shiftStart" placeholder="选择时间段" style="width: 130px"></TimePicker> <TimePicker format="HH:mm" v-model="entity.shiftStart" placeholder="选择时间段" style="width: 130px"></TimePicker>
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row class="rowTitle100">
<FormItem label="类别" prop="typeId">
<RadioGroup v-model="entity.typeId">
<Radio :label="0" disabled>系统</Radio>
<Radio :label="1" disabled>分类</Radio>
<Radio :label="2" disabled>字典</Radio>
<Radio :label="3" disabled>字典项</Radio>
</RadioGroup>
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="名称" prop="name">
<Input v-model="entity.name">
<ColorPicker
v-model="entity.color"
slot="prepend"
transfer
size="small"
transfer
recommend
/>
</Input>
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="编码" prop="code">
<Input v-model="entity.code" />
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="图标" prop="icon">
<InputIcon v-model="entity.icon"></InputIcon>
</FormItem>
</Row>
<FormItem label="状态" prop="number">
<RadioGroup v-model="entity.status">
<Radio :label="0">启用</Radio>
<Radio :label="1">禁用(名称和值可以启用或禁用,但不能删除)</Radio>
</RadioGroup>
</FormItem>
<FormItem label="锁定" prop="number">
<RadioGroup v-model="entity.isStatic">
<Radio :label="0">不锁定</Radio>
<Radio :label="1">锁定(锁定后不可改变名称和值,不能删除)</Radio>
</RadioGroup>
</FormItem>
<Row class="rowTitle100">
<FormItem label="描述" prop="description">
<Input v-model="entity.description" type="textarea" :rows="3"></Input>
</FormItem>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import api from "../api.js";
export default {
name: "Edit",
data() {
return {
entity: {
upId: 0,
typeId: this.v.typeId,
status: 0,
isStatic: 0,
priority: 0,
color: "",
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: ["v"],
mounted() {
if (this.v.id) {
this.entity.typeId = this.v.typeId + 1;
this.entity.upId = this.v.id;
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
api.save(this.entity).then((r) => {
console.warn(r);
if (r.success) {
this.$Message.success("添加成功");
this.$emit("on-ok");
}
});
}
});
},
handleClose() {
this.$emit("on-close");
},
},
watch: {},
};
</script>
...@@ -55,7 +55,9 @@ export default { ...@@ -55,7 +55,9 @@ export default {
name: 'Edit', name: 'Edit',
data() { data() {
return { return {
entity: this.v, entity: {
color:""
},
rules: { rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }], name: [{ required: true, message: '必填', trigger: 'blur' }],
code: [{ required: true, message: '必填', trigger: 'blur' }] code: [{ required: true, message: '必填', trigger: 'blur' }]
...@@ -65,6 +67,13 @@ export default { ...@@ -65,6 +67,13 @@ export default {
props: { props: {
v: Object v: Object
}, },
mounted(){
this.entity = this.v
if(!this.entity.color){
this.entity.color="";
}
},
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
...@@ -86,6 +95,9 @@ export default { ...@@ -86,6 +95,9 @@ export default {
watch: { watch: {
v(v) { v(v) {
this.entity = this.v this.entity = this.v
if(!this.entity.color){
this.entity.color="";
}
console.info(this.entity) console.info(this.entity)
} }
} }
......
<template> <template>
<Layout class="full"> <Layout class="full">
<Sider hide-trigger :style="{background: '#fff'}" class="menu" width="240"> <Sider
hide-trigger
:style="{ background: '#fff' }"
class="menu"
width="240"
>
<h3 class="title"> <h3 class="title">
数据字典 数据字典
<ButtonGroup class="fr" size="small"> <ButtonGroup class="fr" size="small">
<Button icon="md-add" title="新增顶级" @click="add(0)"></Button>
<Button> <Button>
<Icon <Icon
:type="expand?'md-arrow-dropright':'md-arrow-dropdown'" :type="expand ? 'md-arrow-dropright' : 'md-arrow-dropdown'"
size="16" size="16"
@click="toggle" @click="toggle"
title="展开/合并" title="展开/合并"
...@@ -18,22 +24,48 @@ ...@@ -18,22 +24,48 @@
</ButtonGroup> </ButtonGroup>
</h3> </h3>
<div> <div>
<Input v-model.trim="keys" search placeholder="请输入客户名称" clearable /> <Input
v-model.trim="keys"
search
placeholder="请输入名称/编码"
clearable
/>
<Tree <Tree
:data="projectList" :data="projectList"
@on-select-change="change" @on-select-change="change"
class="tree-i" class="tree-i"
:render="renderContent" :render="renderContent"
/> />
<Dropdown
transfer
ref="contentMenu"
style="display: none"
trigger="click"
placement="right-start"
>
<DropdownMenu slot="list" ref="ppp" style="min-width: 80px">
<DropdownItem @click.native="add">
<a>添加</a>
</DropdownItem>
<DropdownItem name="edit" @click.native="editRight">
<a>修改</a>
</DropdownItem>
<!-- <DropdownItem name="del" @click.native="removeNew">
<a>删除</a>
</DropdownItem> -->
</DropdownMenu>
</Dropdown>
</div> </div>
</Sider> </Sider>
<Content class="content"> <Content class="content">
<Tools> <Tools>
<Breadcrumb style="display:inline-block"> <Breadcrumb style="display: inline-block">
<BreadcrumbItem v-for="(li,i) in names" :key="i">{{li}}</BreadcrumbItem> <BreadcrumbItem v-for="(li, i) in names" :key="i">{{
li
}}</BreadcrumbItem>
</Breadcrumb> </Breadcrumb>
<template slot="btns"> <template slot="btns">
<span class="mr20" v-if="node.typeId==2"> <span class="mr20" v-if="node.typeId == 2">
索引: 索引:
<a <a
data-clipboard-action="copy" data-clipboard-action="copy"
...@@ -41,7 +73,8 @@ ...@@ -41,7 +73,8 @@
@click="copy" @click="copy"
id="code" id="code"
class="tag-read" class="tag-read"
>{{node.code}}</a> >{{ node.code }}</a
>
</span> </span>
<Button type="default" @click="setRoot">返回顶级</Button> <Button type="default" @click="setRoot">返回顶级</Button>
</template> </template>
...@@ -53,12 +86,16 @@ ...@@ -53,12 +86,16 @@
border border
:columns="columns" :columns="columns"
:data="data" :data="data"
:draggable="edit==-1" :draggable="edit == -1"
class="tableCommon" class="tableCommon"
@on-drag-drop="onDragDrop" @on-drag-drop="onDragDrop"
> >
<template slot-scope="{ row, index }" slot="typeId"> <template slot-scope="{ row, index }" slot="typeId">
<state code="system.dictionary.typeId" type="text" :value="row.typeId"></state> <state
code="system.dictionary.typeId"
type="text"
:value="row.typeId"
></state>
</template> </template>
<template slot-scope="{ row, index }" slot="status"> <template slot-scope="{ row, index }" slot="status">
<state code="status" type="tag" :value="row.status"></state> <state code="status" type="tag" :value="row.status"></state>
...@@ -67,16 +104,16 @@ ...@@ -67,16 +104,16 @@
<state code="isStatic" type="tag" :value="row.isStatic"></state> <state code="isStatic" type="tag" :value="row.isStatic"></state>
</template> </template>
<template slot-scope="{ row, index }" slot="name"> <template slot-scope="{ row, index }" slot="name">
<span v-if="edit!=index" v-text="row.name"></span> <span v-if="edit != index" v-text="row.name"></span>
<Input v-else type="text" v-model.trim="cur.name" /> <Input v-else type="text" v-model.trim="cur.name" />
</template> </template>
<template slot-scope="{ row, index }" slot="color"> <template slot-scope="{ row, index }" slot="color">
<div v-if="edit!=index"> <div v-if="edit != index">
<ColorPicker <ColorPicker
:value="row.color||''" :value="row.color || ''"
transfer transfer
recommend recommend
@on-change="setColor($event,row,index)" @on-change="setColor($event, row, index)"
/> />
</div> </div>
<div v-else> <div v-else>
...@@ -85,17 +122,20 @@ ...@@ -85,17 +122,20 @@
</template> </template>
<template slot-scope="{ row, index }" slot="icon"> <template slot-scope="{ row, index }" slot="icon">
<div v-if="row.icon"> <div v-if="row.icon">
<Icon :type="row.icon" @on-change="setColor($event,row,index)" /> <Icon
:type="row.icon"
@on-change="setColor($event, row, index)"
/>
</div> </div>
</template> </template>
<template slot-scope="{ row, index }" slot="code"> <template slot-scope="{ row, index }" slot="code">
<span v-if="edit!=index" v-text="row.code"></span> <span v-if="edit != index" v-text="row.code"></span>
<Input v-else type="text" v-model.trim="cur.code" /> <Input v-else type="text" v-model.trim="cur.code" />
</template> </template>
<template slot-scope="{ row, index }" slot="action"> <template slot-scope="{ row, index }" slot="action">
<div v-if="edit!=index" class="action"> <div v-if="edit != index" class="action">
<op class="edit" @click="editRow(row,index)">编辑</op> <op class="edit" @click="editRow(row, index)">编辑</op>
<!-- <op class="remove" @click="delRow(row,index)">删除</op> --> <!-- <op class="remove" @click="delRow(row, index)">删除</op> -->
</div> </div>
<div class="action" v-else> <div class="action" v-else>
<op class="edit" @click="save">保存</op> <op class="edit" @click="save">保存</op>
...@@ -103,36 +143,53 @@ ...@@ -103,36 +143,53 @@
</div> </div>
</template> </template>
</Table> </Table>
<Button type="primary" :disabled="edit!=-1" long @click="addNew" class="mt10">添加</Button> <Button
<Alert type="info" class="mt10" v-if="data.length>1&&edit==-1">提示: 支持拖拽排序,数据未保存时不可拖拽排序。</Alert> type="primary"
:disabled="edit != -1"
long
@click="addNew"
class="mt10"
>添加</Button
>
<Alert type="info" class="mt10" v-if="data.length > 1 && edit == -1"
>提示: 支持拖拽排序,数据未保存时不可拖拽排序。</Alert
>
</div> </div>
<Modal v-model="editModal" :title="editTitle" footer-hide> <Modal v-model="editModal" :title="editTitle" footer-hide>
<Edit :v="editModel" @on-close="editModal=false" @on-ok="editOk" /> <component
:is="datail"
:v="editModel"
@on-close="editModal = false"
@on-ok="editOk"
/>
</Modal> </Modal>
</Content> </Content>
</Layout> </Layout>
</template> </template>
<script> <script>
import Edit from "./components/edit";
import api from "./api.js"; import api from "./api.js";
import Clipboard from "clipboard"; import Clipboard from "clipboard";
const root = { const root = {
id: 0, id: 0,
typeId: -1, typeId: -1,
title: "顶级节点", title: "顶级节点",
code: "" code: "",
}; };
export default { export default {
data() { data() {
return { return {
datail: null,
addTitle: "新增",
addModal: false,
keys: "", keys: "",
treeHeight: "", treeHeight: "",
code: "2", code: "2",
expand: false, expand: false,
editModal: false, editModal: false,
editModel: { editModel: {
color: "" color: "",
}, },
editTitle: "编辑", editTitle: "编辑",
node: root, node: root,
color4: "", color4: "",
...@@ -147,64 +204,64 @@ export default { ...@@ -147,64 +204,64 @@ export default {
{ {
type: "index", type: "index",
width: 60, width: 60,
align: "center" align: "center",
}, },
{ {
title: "类别", title: "类别",
key: "typeId", key: "typeId",
width: 100, width: 100,
align: "center", align: "center",
slot: "typeId" slot: "typeId",
}, },
{ {
title: "颜色", title: "颜色",
key: "color", key: "color",
width: 100, width: 100,
align: "center", align: "center",
slot: "color" slot: "color",
}, },
{ {
title: "名称", title: "名称",
key: "name", key: "name",
width: 150, width: 150,
slot: "name" slot: "name",
}, },
{ {
title: "编码", title: "编码",
key: "code", key: "code",
slot: "code" slot: "code",
}, },
{ {
title: "图标", title: "图标",
key: "icon", key: "icon",
slot: "icon" slot: "icon",
}, },
{ {
title: "描述", title: "描述",
key: "description" key: "description",
}, },
{ {
title: "状态", title: "状态",
key: "status", key: "status",
width: 100, width: 100,
align: "center", align: "center",
slot: "status" slot: "status",
}, },
{ {
title: "锁定", title: "锁定",
key: "isStatic", key: "isStatic",
width: 100, width: 100,
align: "center", align: "center",
slot: "isStatic" slot: "isStatic",
}, },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 160, width: 160,
align: "center", align: "center",
slot: "action" slot: "action",
} },
] ],
}; };
}, },
computed: { computed: {
...@@ -214,7 +271,7 @@ export default { ...@@ -214,7 +271,7 @@ export default {
let items = this.tree; let items = this.tree;
search(this.keys, items); search(this.keys, items);
function search(keys, data) { function search(keys, data) {
data.map(u => { data.map((u) => {
if (keys.length == u.title) { if (keys.length == u.title) {
result.push(u); result.push(u);
} else { } else {
...@@ -235,9 +292,8 @@ export default { ...@@ -235,9 +292,8 @@ export default {
}); });
} }
return result; return result;
} },
}, },
components: { Edit },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
...@@ -259,56 +315,121 @@ export default { ...@@ -259,56 +315,121 @@ export default {
}, },
methods: { methods: {
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
// console.log(data);
return h( return h(
"span", "span",
[ [
h("Poptip", { h(
props: { "Poptip",
content: data.data.code, {
trigger: "hover", props: {
placement:"top-start" content: data.data.code,
}, trigger: "hover",
style: { placement: "top-start",
cursor: "pointer" },
} style: {
},[ cursor: "pointer",
color: data.data.status == 1 ? "#ccc" : "#515a6e",
h('span',{ },
}, },
data.title [
) h(
]) "State",
], {
props: {
value: data.data.typeId,
code: "system.dictionary.typeId",
type: "tag",
},
},
data.data.typeId
),
h(
"span",
{
on: {
// click: () => {
// this.handleSelect(data); //手动选择树节点
// },
//右键点击事件
contextmenu: (e) => {
e.preventDefault();
this.$refs.contentMenu.$refs.reference = event.target;
this.$refs.contentMenu.currentVisible = !this.$refs
.contentMenu.currentVisible;
this.editModel = data.data;
console.warn("addd", this.editModel);
},
},
},
data.title
// +" ["+data.data.typeId+"]"
),
]
),
]
// data.title // data.title
); );
}, },
copy() { copy() {
var clipboard = new Clipboard(".tag-read"); var clipboard = new Clipboard(".tag-read");
clipboard.on("success", e => { clipboard.on("success", (e) => {
this.$Message.success("复制成功:" + this.node.code); this.$Message.success("复制成功:" + this.node.code);
clipboard.destroy(); clipboard.destroy();
}); });
clipboard.on("error", e => { clipboard.on("error", (e) => {
// 不支持复制 // 不支持复制
console.log("该浏览器不支持自动复制"); // 释放内存 console.log("该浏览器不支持自动复制"); // 释放内存
clipboard.destroy(); clipboard.destroy();
}); });
}, },
editRight() {
this.editRow(this.editModel);
},
editRow(row, index) { editRow(row, index) {
this.editTitle = "编辑"; this.editTitle = "编辑";
this.editModal = true; this.editModal = true;
this.editModel = row; this.editModel = row;
this.datail = () => import("./components/edit");
}, },
toggle() { toggle() {
this.expand = !this.expand; this.expand = !this.expand;
this.loadTree(); this.loadTree();
}, },
addOk() {
this.load();
this.loadTree();
this.addModal = false;
this.detail = null;
},
add(upId) {
if (upId == 0) {
this.editModel = {
// id:-1,
upId: 0,
name: "",
code: "",
color: "",
status: 0,
isStatic: 0,
typeId: 0,
priority: this.edit,
};
// console.warn("VVVVVVVVVVVVVVVVV")
}
this.datail = () => import("./components/add");
this.editModal = true;
},
editOk() { editOk() {
this.load(); this.load();
this.editModal = false; this.editModal = false;
}, },
removeNew() {
this.delRow(this.editModel);
},
delRow(row, index) { delRow(row, index) {
var url = `${systemUrl}/Dictionary/Delete?id=${row.id}`; var url = `${systemUrl}/Dictionary/Delete?id=${row.id}`;
this.$Modal.confirm({ this.$Modal.confirm({
...@@ -317,16 +438,16 @@ export default { ...@@ -317,16 +438,16 @@ export default {
onOk: () => { onOk: () => {
this.$api this.$api
.delete(`${url}`) .delete(`${url}`)
.then(r => { .then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("删除成功"); this.$Message.success("删除成功");
this.load(); this.load();
} }
}) })
.catch(error => { .catch((error) => {
this.$Message.error("删除失败"); this.$Message.error("删除失败");
}); });
} },
}); });
}, },
change(nodes, node) { change(nodes, node) {
...@@ -335,7 +456,7 @@ export default { ...@@ -335,7 +456,7 @@ export default {
id: node.id, id: node.id,
typeId: node.data.typeId, typeId: node.data.typeId,
title: node.title, title: node.title,
code: node.data.code code: node.data.code,
}; };
// this.names = [node.title] // this.names = [node.title]
let cur = node; let cur = node;
...@@ -374,7 +495,7 @@ export default { ...@@ -374,7 +495,7 @@ export default {
var expand = this.expand; var expand = this.expand;
setParent(null, items); setParent(null, items);
function setParent(parent, items) { function setParent(parent, items) {
items.map(u => { items.map((u) => {
u.parent = parent; u.parent = parent;
u.expand = expand; u.expand = expand;
if (u.children) { if (u.children) {
...@@ -388,11 +509,11 @@ export default { ...@@ -388,11 +509,11 @@ export default {
onDragDrop(a, b) { onDragDrop(a, b) {
this.data.splice(b, 1, ...this.data.splice(a, 1, this.data[b])); this.data.splice(b, 1, ...this.data.splice(a, 1, this.data[b]));
let ids = []; let ids = [];
this.data.map(u => { this.data.map((u) => {
ids.push(u.id); ids.push(u.id);
}); });
if (ids.length > 1) { if (ids.length > 1) {
api.setSort({ ids }).then(r => { api.setSort({ ids }).then((r) => {
if (!r.success) { if (!r.success) {
this.$Message.error("排序失败"); this.$Message.error("排序失败");
this.load(); this.load();
...@@ -400,6 +521,7 @@ export default { ...@@ -400,6 +521,7 @@ export default {
}); });
} }
}, },
addNew() { addNew() {
this.edit = this.data.length; this.edit = this.data.length;
this.cur = { this.cur = {
...@@ -410,7 +532,7 @@ export default { ...@@ -410,7 +532,7 @@ export default {
status: 0, status: 0,
isStatic: 0, isStatic: 0,
typeId: this.node.typeId + 1, typeId: this.node.typeId + 1,
priority: this.edit priority: this.edit,
}; };
this.data.push(this.cur); this.data.push(this.cur);
}, },
...@@ -428,15 +550,15 @@ export default { ...@@ -428,15 +550,15 @@ export default {
this.$Message.error("值不能为空"); this.$Message.error("值不能为空");
return; return;
} }
api.save(this.cur).then(r => { api.save(this.cur).then((r) => {
console.warn(r); // console.warn(r);
if (r.success) { if (r.success) {
this.$Message.success("添加成功"); this.$Message.success("添加成功");
this.load(); this.load();
} }
}); });
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
<template>
<div class="addUser">
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row class="rowTitle100">
<Col :span="12">
<FormItem :label="l('userName')" prop="userName">
<Input v-model="entity.userName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('cardNo')" prop="cardNo">
<Input v-model="entity.cardNo"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="User.base.status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('gender')" prop="gender">
<Dictionary code="User.base.gender" v-model="entity.gender" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('birthday')" prop="birthday">
<DatePicker type="date" v-model="entity.birthday" placeholder="请选择"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('degreeId')" prop="degreeId">
<Dictionary code="User.base.degree" v-model="entity.degreeId"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('departmentTitle')" prop="departmentTitle">
<DepartmentSelect v-model="entity.departmentId" @on-change="setDepartmentTitle" />
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('phone')" prop="phone">
<Input v-model="entity.phone" />
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('email')">
<Input v-model="entity.email" />
</FormItem>
</Col>
<!-- <Col :span="12">
<FormItem :label="l('enableEquip')" prop="enableEquip">
<Input v-model="entity.enableEquip"></Input>
</FormItem>
</Col>-->
<Col :span="12">
<FormItem :label="l('positionId')" prop="positionId">
<Dictionary code="User.base.position" v-model="entity.positionId"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('titleId')" prop="titleId">
<Dictionary code="User.base.jobtitle" v-model="entity.titleId"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('licensedToWork')" prop="licensedToWork">
<Dictionary code="User.base.workLicense" v-model="entity.licensedToWork"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('property')">
<Checkbox v-model="entity.property">排产资源</Checkbox>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="3"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</div>
</template>
<script>
import Api from "./api";
import util from '@/libs/util';
const valideTel = (rule, value, callback) => {
var re = /^1[3-9]{1}[0-9]{9}/;
if (value === "" || value === null) {
callback(new Error("请输入手机号"));
} else if (!re.test(value)) {
callback(new Error("请输入正确手机号"));
} else {
callback();
}
};
export default {
name: "Add",
components: {},
data() {
const validateCarNo = (rule, value, callback) => {
if (!value) {
return callback(new Error("员工编号不能为空"));
}
Api.list(value).then(r => {
if (r.result.length > 0) {
return callback(new Error("员工编号已经存在"));
} else {
callback();
}
});
};
return {
disabled: false,
showDeptTree: false,
entity: {
gender: 1,
status: 1,
property: false,
userType:2
},
rules: {
userName: [{
required: true,
message: "必填",
trigger: "blur"
}],
cardNo: [{
required: true,
message: "必填",
trigger: "blur"
},
{
validator: validateCarNo,
trigger: "blur"
}
],
departmentTitle: [{
required: true,
message: "必选",
trigger: "change"
}],
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
phone: [{
validator: valideTel,
required: true,
trigger: "blur"
}]
// degreeId: [
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// ],
// phone: [{ required: true, message: '必填', trigger: 'blur' }]
}
};
},
props: {
v: Object
},
methods: {
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
if (this.entity.property) {
this.entity.property = 2;
} else {
this.entity.property = "";
}
this.disabled = true;
Api.create(this.entity)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
//账户同步操作start
let parms = {
userId: r.result.id,
loginName: this.entity.phone, //用户电话
status: this.entity.status, //状态
// tenantCode: this.$store.state.userInfo.tenantCode, //商户号
tenantCode: util.cookies.get('tenantCode'), //商户号
name: this.entity.userName
};
Api.authAccount(parms).then(res => {
if (res.success) {
this.$Message.success("账户同步成功");
//修改用户表的accountId start
let parms1 = {
userId: parms.userId,
accountId: res.result
};
Api.updateAccount(parms1).then(res1 => {
if (res1.success) {
this.$Message.success("操作成功");
this.$emit("on-ok");
} else {
this.$Message.error("同步失败");
}
});
//修改用户表的accountId end
}
});
//账户同步操作end
} else {
this.$Message.error(r.error.message);
}
})
.catch(err => {
// alert(JSON.stringify(err))
console.warn(err);
this.disabled = false;
this.$Message.error(err.error.message);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "user" + "." + key;
return this.$t(key);
},
setDepartmentTitle(v, item) {
this.entity.departmentTitle = item.name;
},
selectDepart() {
this.showDeptTree = true;
},
getBirthday(value) {
this.entity.birthday = value;
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v);
}
}
};
</script>
<style lang="less">
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</style>
import Api from '@/plugins/request'
export default {
index: `${systemUrl}/user/paged`,
paged(params) {
return Api.post(`${systemUrl}/user/paged`, params);
},
list(cardNo) {
var params={
"conditions": [
{
"fieldName": "cardNo",
"fieldValue": cardNo,
"conditionalType": "Equal"
}
],
"pageSize": 3
}
return Api.post(`${systemUrl}/user/list`, params);
},
get(params) {
return Api.get(`${systemUrl}/user/get`, params);
},
create(params) {
return Api.post(`${systemUrl}/user/create`, params);
},
update(params) {
return Api.post(`${systemUrl}/user/update`, params);
},
//在10010上更新用户信息//新增、修改、删除、修改密码
authAccount(params) {
return Api.post(`${Platform}/account/sync`, params);//168
// return Api.post(`${Platform}/api/services/app/useraccount/sync`, params);
},
//10010重置密码
authResetpassword(params) {
return Api.post(`${UserUrl}/api/services/app/account/resetpassword`, params);
},
//10010修改密码
authChangepassword(params) {
return Api.post(`${authUrl}/api/services/app/useraccount/changepassword`, params);
},
//在10020上更新用户AccountId信息
updateAccount(params) {
return Api.post(`${systemUrl}/user/updateaccountid`, params);
},
//删除:
delete(params) {
return Api.delete(`${systemUrl}/user/delete`, {
params: params
});
},
//重置密码
accountreset(params) {
return Api.post(`${systemUrl}/user/accountreset`, params);
},
//批量导入用户
userImport(params) {
return Api.post(`${systemUrl}/userimportservice/import`, params);
},
}
\ No newline at end of file
<template>
<div class="addUser">
<Form ref="form" :model="entity" :label-width="90">
<Row class="row_border_bottom">
<Col :span="8">
<!-- <FormItem :label="l('userName')" prop="userName">{{entity.userName}}</FormItem> -->
<b>{{l('userName')}}</b>
<p>{{entity.userName}}</p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('cardNo')" prop="cardNo">{{entity.cardNo}}</FormItem> -->
<b>{{l('cardNo')}}</b>
<p>{{entity.cardNo}}</p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('gender')" prop="gender">
<state code="User.base.gender" :value="entity.gender" type="text"></state>
</FormItem> -->
<b>{{l('gender')}}</b>
<p><state code="User.base.gender" :value="entity.gender" type="text"></state></p>
</Col>
</Row>
<Row class="row_border_bottom">
<Col :span="8">
<!-- <FormItem :label="l('birthday')" prop="birthday">{{entity.birthday}}</FormItem> -->
<b>{{l('birthday')}}</b>
<p>{{entity.birthday}}</p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('degreeId')" prop="degreeId">
<state code="User.base.degree" :value="entity.degreeId" type="text"></state>
</FormItem> -->
<b>{{l('degreeId')}}</b>
<p><state code="User.base.degree" :value="entity.degreeId" type="text"></state></p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('departmentTitle')" prop="departmentTitle">{{entity.departmentTitle}}</FormItem> -->
<b>{{l('departmentTitle')}}</b>
<p>{{entity.departmentTitle}}</p>
</Col>
</Row>
<Row class="row_border_bottom">
<Col :span="8">
<!-- <FormItem :label="l('status')" prop="status">
<state code="User.base.status" :value="entity.status" type="text"></state>
</FormItem> -->
<b>{{l('status')}}</b>
<p><state code="User.base.status" :value="entity.status" type="text"></state></p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('phone')" prop="phone">{{entity.phone}}</FormItem> -->
<b>{{l('phone')}}</b>
<p>{{entity.phone}}</p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('email')" prop="email">{{entity.email}}</FormItem> -->
<b>{{l('email')}}</b>
<p>{{entity.email}}</p>
</Col>
<!-- <Col :span="12">
<FormItem :label="l('enableEquip')" prop="enableEquip">{{entity.enableEquip}}</FormItem>
</Col> -->
</Row>
<Row class="row_border_bottom">
<Col :span="8">
<!-- <FormItem :label="l('positionId')" prop="positionId">
<state code="User.base.position" :value="entity.positionId" type="text"></state>
</FormItem> -->
<b>{{l('positionId')}}</b>
<p><state code="User.base.position" :value="entity.positionId" type="text"></state></p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('titleId')" prop="titleId">
<state code="User.base.jobtitle" :value="entity.titleId" type="text"></state>
</FormItem> -->
<b>{{l('titleId')}}</b>
<p><state code="User.base.titleId" :value="entity.titleId" type="text"></state></p>
</Col>
<Col :span="8">
<!-- <FormItem :label="l('licensedToWork')" prop="licensedToWork">
<state code="User.base.workLicense" :value="entity.licensedToWork" type="text"></state>
</FormItem> -->
<b>{{l('workLicense')}}</b>
<p><state code="User.base.workLicense" :value="entity.workLicense" type="text"></state></p>
</Col>
</Row>
<Row class="row_border_bottom">
<Col :span="24">
<!-- <FormItem :label="l('remark')" prop="remark">{{entity.remark}}</FormItem> -->
<b>{{l('remark')}}</b>
<p>{{entity.remark}}</p>
</Col>
</Row>
</Form>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
entity: {}
}
},
props: {
eid: Number
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result
this.$emit('on-load')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = 'user' + '.' + key
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v)
}
}
}
}
</script>
<style lang="less">
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</style>
<template>
<div class="addUser">
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row class="rowTitle100">
<Col :span="12">
<FormItem :label="l('userName')" prop="userName">
<Input v-model="entity.userName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('cardNo')" prop="cardNo">
<span v-text="entity.cardNo"></span>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="User.base.status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('gender')" prop="gender">
<Dictionary code="User.base.gender" v-model="entity.gender" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('birthday')" prop="birthday">
<DatePicker type="date" v-model="entity.birthday" style="width:100%" placeholder="请选择"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('degreeId')" prop="degreeId">
<Dictionary code="User.base.degree" v-model="entity.degreeId"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('departmentTitle')" prop="departmentTitle">
<DepartmentSelect v-model="entity.departmentId" @on-change="setDepartmentTitle" />
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('phone')" prop="phone">
<Input v-model="entity.phone" />
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('email')">
<Input v-model="entity.email" />
</FormItem>
</Col>
<!-- <Col :span="12">
<FormItem :label="l('enableEquip')" prop="enableEquip">
<Input v-model="entity.enableEquip"></Input>
</FormItem>
</Col>-->
<Col :span="12">
<FormItem :label="l('positionId')" prop="positionId">
<Dictionary code="User.base.position" v-model="entity.positionId"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('titleId')" prop="titleId">
<Dictionary code="User.base.jobtitle" v-model="entity.titleId"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('licensedToWork')" prop="licensedToWork">
<Dictionary code="User.base.workLicense" v-model="entity.licensedToWork"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('property')">
<Checkbox v-model="entity.property">排产资源</Checkbox>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="用户类型">
<Dictionary code="User.base.UserType" v-model="entity.userType"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="3"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</div>
</template>
<script>
import Api from "./api";
const valideTel = (rule, value, callback) => {
var re = /^1[3-9]{1}[0-9]{9}/;
if (value === "" || value === null) {
callback(new Error("请输入手机号"));
} else if (!re.test(value)) {
callback(new Error("请输入正确手机号"));
} else {
callback();
}
};
export default {
name: "Edit",
data() {
return {
disabled: false,
showDeptTree: false,
entity: {},
rules: {
userName: [{
required: true,
message: "必填",
trigger: "blur"
}],
departmentTitle: [{
required: true,
message: "必选",
trigger: "blur"
}],
//cardNo: [{ required: true, message: '必填', trigger: 'blur' }],
// birthday: [{ required: true, message: '必填', trigger: 'change' }],
// degreeId: [
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// ],
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
phone: [{
validator: valideTel,
required: true,
trigger: "blur"
}]
}
};
},
props: {
eid: Number
},
methods: {
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
if (r.result.property == 2) {
this.entity.property = true;
} else {
this.entity.property = false;
}
this.$emit("on-load");
});
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
if ((this.entity.property = true)) {
this.entity.property = 2;
} else {
this.entity.property = "";
}
Api.update(this.entity)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
//账户同步操作start
if (this.entity.accountId > 0) {
//账户已同步的情况下
let parms2 = {
accountId: this.entity.accountId,
userId: this.entity.id,
loginName: this.entity.phone, //用户电话
status: this.entity.status,
tenantCode: this.$store.state.userInfo.tenantCode, //商户号
name: this.entity.userName
};
Api.authAccount(parms2).then(res => {
//同步电话信息等
if (res.success) {
this.$Message.success("账户同步成功");
} else {
this.$Message.error("账户同步失败");
}
});
} else {
//账户新建后还未同步成功的情况下
let parms = {
userId: this.entity.id,
loginName: this.entity.phone, //用户电话
status: this.entity.status,
tenantCode: this.$store.state.userInfo.tenantCode, //商户号
name: this.entity.userName
};
Api.authAccount(parms).then(res1 => {
if (res1.success) {
this.$Message.success("账户同步成功");
//修改用户表的accountId start
let parms1 = {
userId: parms.userId,
accountId: res1.result //账户同步成功后返回的accountId
};
Api.updateAccount(parms1).then(res2 => {
if (res2.success) {
this.$Message.success("操作成功");
} else {
this.$Message.error("操作失败");
}
});
//修改用户表的accountId end
}
});
}
//账户同步操作end
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "user" + "." + key;
return this.$t(key);
},
setDepartmentTitle(v, item) {
if (item) {
this.entity.departmentTitle = item.name;
}
},
getBirthday(value) {
this.entity.birthday = value;
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
};
</script>
<style lang="less">
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</style>
<template>
<Layout class="full">
<Sider hide-trigger :style="{background: '#fff'}" width="260" class="menu" style=" flex:0;border:none">
<div class="zh-tree" :style="{height:treeHeight+'px'}">
<h3 class="zh-title">部门结构</h3>
<div class="zh-box">
<Input search placeholder="请输入查询条件" v-model="treeInputSearch" />
<Tree :data="searchList" class="tree-content" @on-select-change="selectTreeNode"></Tree>
</div>
</div>
</Sider>
<Content class="content">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" placeholder="请输入姓名/员工编号" exportTitle="用户管理" :high="true" :height="tdHeight">
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="addModal=true">新增</Button>
<Button @click="openModalIm">导入</Button>
</template>
</DataGrid>
<Modal v-model="addModal" title="新增" footer-hide width="800">
<Add @on-close="cancel" @on-ok="addOk" />
</Modal>
<Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :eid="curId" @on-close="cancel" @on-ok="addOk" />
</Modal>
<Modal v-model="detailModal" title="详情" width="900">
<Detail :eid="curId" />
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
<p>确定删除?</p>
</Modal>
<!-- 重置密码 -->
<Modal v-model="show7" title="提示" :mask-closable="false" ok-text="确定" cancel-text="取消" @on-ok="reset">此操作将密码重置为初始密码, 是否继续?</Modal>
<!-- 授权 -->
<Modal v-model="show3" title="授权-当前用户" :width="800" :mask-closable="false" ok-text="保存" cancel-text="取消" @on-ok="authOk" @on-cancel="authCancle">
<div style="max-height:400px;overflow:auto">
<Form :model="authModel" :label-width="70">
<Row>
<Col span="24">
默认角色
<!-- <Input type="textarea" size="large" :rows="2" v-model="defaultRole" placeholder="暂无数据"/>
-->
<div style="width:750px;border:2px solid #E8EAEC;margin-top:10px">
<Row>
<CheckboxGroup v-model="authModel.default">
<Col span="5" offset="1" v-for="(item,index) in authList1" :key="index" style="line-height:33px;font-size:14px;">
<Checkbox :label="item.id">{{item.name}}</Checkbox>
</Col>
</CheckboxGroup>
</Row>
</div>
</Col>
</Row>
<Row>
<Col span="24">
<div style="margin-top:10px;">
自定义角色
<div style="width:750px;border:2px solid #E8EAEC;margin-top:10px">
<Row>
<CheckboxGroup v-model="authModel.extra">
<Col span="5" offset="1" v-for="(item,index) in authList" :key="index" style="line-height:33px;font-size:14px;">
<Checkbox :label="item.id">{{item.name}}</Checkbox>
</Col>
</CheckboxGroup>
</Row>
</div>
</div>
</Col>
</Row>
</Form>
</div>
</Modal>
<Modal v-model="syncAccountModal" title="同步账户" @on-ok="syncAccountOk" @on-cancel="cancel">
<p>确定同步账户?</p>
</Modal>
<ImportExcel ref="importExcel" @on-get-data="getData" :modalTitle="temTitle" :columns="columns" :open="ModalIm" @on-cancel="ModalImCancel" @on-ok="ok" />
</Content>
</Layout>
</template>
<script>
import Api from "./api";
import ApiDepart from "../department/api";
import Add from "./add";
import Edit from "./edit";
import Detail from "./detail";
import Search from "./search";
import service from "@/plugins/request";
import util from "@/libs/util";
import {
Time
} from "view-design";
import XLSX from "xlsx";
export default {
name: "list",
components: {
Add,
Edit,
Detail,
Search,
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "userName,cardNo,national,phone,email,enableEquip,jobNo,remark,departmentTitle,roleTitles",
value: null,
default: true,
},
departmentId: {
op: "In",
value: ""
},
userType: {
op: "Equal",
value: "2"
},
},
treeData: [],
tdHeight: "",
tdHeightExcel: "",
treeInputSearch: "",
treeHeight: "",
tableHeight: "",
show7: false, //重置密码
show3: false, //授权角色
authList: [],
authList1: [],
authModel: {
default: [],
extra: []
},
ids: [],
addModal: false,
editModal: false,
detailModal: false,
deletelModal: false,
syncAccountModal: false,
curId: 0,
columns: [
// {
// title: '序号',
// type: 'index',
// width: 80,
// align: 'center'
// },
{
key: "id",
title: this.l("id"),
hide: true,
align: "left"
},
{
key: "userName",
title: this.l("userName"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.detail(params.row.id)
},
},
params.row.userName
),
]);
},
},
// {
// key: 'cardTypeId',
// title: this.l('cardTypeId'),
// align: 'left',
// high: true,
// hide: true
// },
{
key: "cardNo",
title: this.l("cardNo"),
align: "left",
width:95,
easy: true,
high: true,
},
{
key: "gender",
title: this.l("gender"),
align: "center",
high: true,
width:65,
code: "User.base.gender",
import: true,
},
{
key: "birthday",
title: this.l("birthday"),
align: "center",
high: true,
width:95,
type: "date",
import: true,
},
{
key: "degreeId",
title: this.l("degreeId"),
align: "left",
high: true,
code: "User.base.degree",
import: true,
},
{
key: "status",
title: this.l("status"),
align: "center",
high: true,
code: "User.base.status",
import: true,
},
{
key: "departmentId",
title: this.l("departmentId"),
align: "right",
easy: true,
high: true,
import: true,
},
{
key: "departmentTitle",
title: this.l("departmentTitle"),
align: "left",
easy: true,
width:100,
high: true,
import: true,
},
{
key: "roleTitles",
title: this.l("roleTitles"),
align: "left",
easy: true,
high: true,
hide: true,
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail",
class: params.row.roleTitles == null ||
params.row.roleTitles == "" ?
"empower" : "detail",
},
on: {
click: () => this.authorize(params.row.id)
},
},
params.row.roleTitles == null || params.row.roleTitles == "" ?
"授权" :
params.row.roleTitles
),
]);
},
},
{
key: "accountId",
title: this.l("accountId"),
hide: true,
align: "left",
import: true,
},
// {
// key: 'userType',
// title: this.l('userType'),
// hide: true,
// align: 'left'
// },
{
key: "phone",
title: this.l("phone"),
align: "left",
easy: true,
high: true,
import: true,
},
{
key: "email",
title: this.l("email"),
align: "left",
easy: true,
high: true,
import: true,
},
{
key: "licensedToWork",
title: this.l("licensedToWork"),
align: "left",
code: "User.base.workLicense",
import: true,
},
{
key: "positionId",
title: this.l("positionId"),
align: "left",
high: true,
code: "User.base.position",
import: true,
},
{
key: "titleId",
title: this.l("titleId"),
align: "left",
high: true,
code: "User.base.jobtitle",
import: true,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
import: false,
hide: true,
import: true,
type: 'user'
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
import: false,
hide: true,
import: true,
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
align: "left",
import: false,
hide: true,
import: true,
type: 'user'
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
align: "left",
import: false,
hide: true,
import: true,
},
{
title: "操作",
key: "action",
width: 185,
align: "right",
import: false,
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail",
class: "empower",
},
on: {
click: () => this.syncAccount(params.row)
},
},
params.row.accountId == 0 ? "同步" : ""
),
h(
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.edit(params.row.id)
},
},
"编辑"
),
h(
"op", {
attrs: {
oprate: "remove"
},
on: {
click: () => this.remove(params.row)
},
},
"删除"
),
h(
"op", {
attrs: {
oprate: "detail",
},
on: {
click: () => this.openReset(params.row)
},
},
"重置密码"
),
]);
},
},
],
selectRow: {}, //删除时选中的行数据
//导入导出时使用start
formatList: ["xlsx"],
searchs: {
pageIndex: 1,
pageSize: 1000,
conditions: [],
},
list: [],
modalImport: false,
excelData: [],
departArr: [], //部门list
columnsImport: [],
temTitle: '用户管理',
ModalIm: false,
//导入导出时使用end
};
},
created() {
this.treeHeight = window.innerHeight - 150;
this.tdHeight = window.innerHeight - 240;
this.tdHeightExcel = window.innerHeight - 240;
//导出对列表头进行预加载start
let tempCol = this.$u.clone(this.columns);
tempCol.forEach((ele, index) => {
if (ele.key == "action") {
ele.hide = true;
}
});
this.columnsImport = tempCol;
//导出对列表头进行预加载end
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.treeHeight = window.screenHeight - 150;
this.tdHeight = window.screenHeight - 240;
this.tdHeightExcel = window.innerHeight - 240;
})();
};
this.initTree();
this.loadrole(0);
this.loadrole(1);
},
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
addOk() {
this.$refs.grid.load();
// this.$refs.grid.reload(this.easySearch)
this.addModal = false;
this.detailModal = false;
this.editModal = false;
this.curId = 0;
//this.$refs.grid.easySearch()
},
search() {
this.$refs.grid.reload(this.easySearch);
},
detail(id) {
this.detailModal = true;
this.curId = id;
},
edit(id) {
this.editModal = true;
this.curId = id;
},
remove(row) {
this.deletelModal = true;
this.curId = row.id;
this.selectRow = row;
},
removeOk() {
Api.delete({
id: this.curId
}).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.deletelModal = false;
if (this.selectRow.accountId > 0) {
//删除成功后更新auth start
let parms = {
userId: this.curId,
accountId: this.selectRow.accountId,
tenantCode: util.cookies.get("tenantCode"),
isDeleted: true,
name: this.selectRow.userName,
};
Api.authAccount(parms).then((res) => {
if (res.success) {
this.$Message.success("账户同步成功");
}
});
}
//删除成功后更新auth end
this.$Message.success("删除成功");
}
});
},
removeCancel() {
this.deletelModal = false;
},
cancel() {
this.curId = 0;
this.addModal = false;
this.detailModal = false;
this.editModal = false;
this.deletedlModal = false;
this.syncAccountModal = false;
},
l(key) {
let vkey = "user" + "." + key;
return this.$t(vkey) || key;
},
initTree() {
this.$http.department.getDepartmentTree(this.treeData);
},
selectTreeNode1(value) {
if (value != "") {
this.searchObj.departmentId = null;
this.searchObj.level_Desc = value[0].value;
this.mDatas.splice(0);
this.$http.sysUser.getSearchTable2(this.mDatas, this.searchObj);
}
},
selectTreeNode(value) {
if (value.length > 0) {
this.ids = [];
this.getAllIds(value);
if (this.ids.length > 0) {
this.easySearch.departmentId.value = this.ids;
} else {
this.easySearch.departmentId.value = [-1];
}
this.$refs.grid.easySearch();
}
},
getAllIds(trees) {
trees.forEach((data, index) => {
var that = this;
this.ids.push(data.value);
if (data.children.length > 0) {
this.getAllIds(data.children);
}
});
},
//重置密碼
openReset(row) {
this.show7 = true;
this.curId = row.id;
this.selectRow = row;
},
reset() {
let parms = {
userId: this.curId,
accountId: this.selectRow.accountId,
};
Api.authResetpassword(parms).then((res) => {
if (res.success) {
this.$Message.success("重置成功!");
} else {
this.$Message.error("重置失败!");
}
});
},
//授权角色
loadrole(type) {
var url = `${systemUrl}/MyRole/GetRolesAsync`;
var data = [];
service.get(`${url}`, {
role_type: type
}).then((response) => {
data = response.result.items;
if (type == 1) {
this.authList = data;
}
if (type == 0) {
this.authList1 = data;
}
});
},
authorize(id) {
//授权
this.authModel.default = [];
this.authModel.extra = [];
this.curId = id;
this.show3 = true;
var url = `${systemUrl}/MyUserRole/GetPaged`;
service.get(`${url}`, {
userId: id
}).then((response) => {
var data = response.result.items;
var dt1 = data.filter(function (ite) {
return ite.role_type == 0;
});
var dt2 = data.filter(function (ite) {
return ite.role_type == 1;
});
dt1.forEach((item, i) => {
this.authModel.default.push(item.roleId);
});
dt2.forEach((item, i) => {
this.authModel.extra.push(item.roleId);
});
});
},
authOk() {
var url = `${systemUrl}/MyUserRole/CreateOrUpdate`;
service
.post(`${url}`, {
myUserRole: {
userId: this.curId,
RoleIds: this.allChecked.join(","),
},
})
.then((response) => {
if (response.success) {
this.$Message.success("保存成功");
this.authModel.extra = [];
this.authModel.default = [];
this.$refs.grid.easySearch();
}
})
.catch((error) => {
this.$Message.error("保存失败");
});
},
authCancle() {},
//同步账户start
syncAccount(row) {
this.syncAccountModal = true;
this.selectRow = row;
},
syncAccountOk() {
let parms = {
userId: this.selectRow.id,
loginName: this.selectRow.phone,
status: this.selectRow.status,
tenantCode: util.cookies.get("tenantCode"),
name: this.selectRow.userName,
};
if (this.selectRow.phone && this.selectRow.phone != "") {
Api.authAccount(parms).then((res) => {
if (res.success) {
this.$Message.success("账户同步成功");
let parms1 = {
userId: parms.userId,
accountId: res.result,
};
Api.updateAccount(parms1).then((res1) => {
if (res1.success) {
this.$Message.success("操作成功");
this.$refs.grid.easySearch();
} else {
this.$Message.error("同步失败");
}
});
}
});
} else {
this.$Message.error("请完善个人电话信息");
}
},
//同步账户end
//导入excel
//导入功能
openModalIm() {
this.ModalIm = true
},
ModalImCancel() {
this.ModalIm = false
},
ok() {
this.$refs.grid.load();
},
getData(val) {
let url = `${systemUrl}/userimportservice/import`;
this.$refs.importExcel.deelData(url, this.columns, this.formatMethod(val))
},
//根据页面二次处理数据
formatMethod(val) {
let tempData = this.$u.clone(val);
let tempList = [];
tempData.forEach((ele) => {
let obj = {
userName: ele.userName ? ele.userName : '',
cardNo: ele.cardNo ? ele.cardNo : '', //用户编号
gender: ele.gender ? ele.gender : '', //性别
birthday: ele.birthday ? ele.birthday : '',
degreeId: ele.degreeId ? ele.degreeId : '',
departmentId: ele.departmentId ? ele.departmentId : null,
status: ele.status ? ele.status : null,
phone: ele.phone ? ele.phone : '',
email: ele.email ? ele.email : '',
licensedToWork: ele.licensedToWork ? ele.licensedToWork : null,
positionId: ele.positionId ? ele.positionId : null,
titleId: ele.titleId ? ele.titleId : null,
departmentTitle: ele.departmentTitle ? ele.departmentTitle : '',
};
if (ele.userName && ele.userName != '' && ele.cardNo && ele.cardNo != '' && ele.departmentId && ele.departmentId != null && ele.phone && ele.phone != '') {
obj.ico = false
} else {
obj.ico = true
}
tempList.push(obj);
});
return tempList
},
//批量导入end
},
computed: {
searchList() {
let nodeList = this.treeData;
var text = this.treeInputSearch;
var newNodeList = [];
function searchTree(nodeLists, value) {
for (let i = 0; i < nodeLists.length; i++) {
if (nodeLists[i].title.indexOf(value) != -1) {
newNodeList.push(nodeLists[i]);
} else if (nodeLists[i].children.length > 0) {
searchTree(nodeLists[i].children, value);
}
}
}
if (text != "") {
searchTree(nodeList, text);
} else {
return nodeList;
}
return newNodeList;
},
allChecked: function () {
return [...this.authModel.extra, ...this.authModel.default];
},
},
};
</script>
<style lang="less" scoped>
.full {
margin-top: 0;
.content {
margin-top: 10px;
}
}
</style>
<template>
<div class="addUser">
<Form ref="form" :model="condition" :label-width="100">
<Row class="rowTitle100">
<Col :span="12" v-if="condition.id.show">
<FormItem :label="l('id')" prop="id">
<Input v-model="condition.id.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.userName.show">
<FormItem :label="l('userName')" prop="userName">
<Input v-model="condition.userName.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.cardTypeId.show">
<FormItem :label="l('cardTypeId')" prop="cardTypeId">
<Input v-model="condition.cardTypeId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.cardNo.show">
<FormItem :label="l('cardNo')" prop="cardNo">
<Input v-model="condition.cardNo.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="User.base.status" v-model="condition.status.value" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.gender.show">
<FormItem :label="l('gender')" prop="gender">
<Dictionary code="User.base.gender" v-model="condition.gender.value" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.birthday.show">
<FormItem :label="l('birthday')" prop="birthday">
<DTSearch v-model="condition.birthday.value" @on-change="setTime" :showFast="false" type="date"></DTSearch>
</FormItem>
</Col>
<Col :span="12" v-if="condition.departmentTitle.show">
<FormItem :label="l('departmentTitle')" prop="departmentTitle">
<DepartmentSelect
v-model="condition.departmentId.value"
@on-change="setDepartmentTitle"
/>
</FormItem>
</Col>
<Col :span="12" v-if="condition.national.show">
<FormItem :label="l('national')" prop="national">
<Input v-model="condition.national.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.creatorUserId.show">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<Input v-model="condition.creatorUserId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.creationTime.show">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModifierUserId.show">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<Input v-model="condition.lastModifierUserId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModificationTime.show">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.accountId.show">
<FormItem :label="l('accountId')" prop="accountId">
<Input v-model="condition.accountId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.isDeleted.show">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<Dictionary v-model="condition.isDeleted.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.userType.show">
<FormItem :label="l('userType')" prop="userType">
<Input v-model="condition.userType.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.phone.show">
<FormItem :label="l('phone')" prop="phone">
<Input v-model="condition.phone.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.email.show">
<FormItem :label="l('email')" prop="email">
<Input v-model="condition.email.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.degreeId.show">
<FormItem :label="l('degreeId')" prop="degreeId">
<Dictionary code="User.base.degree" v-model="condition.degreeId.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.avatarUrl.show">
<FormItem :label="l('avatarUrl')" prop="avatarUrl">
<Input v-model="condition.avatarUrl.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.enableEquip.show">
<FormItem :label="l('enableEquip')" prop="enableEquip">
<Input v-model="condition.enableEquip.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.positionId.show">
<FormItem :label="l('positionId')" prop="positionId">
<Dictionary code="User.base.position" v-model="condition.positionId.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.titleId.show">
<FormItem :label="l('titleId')" prop="titleId">
<Dictionary code="User.base.jobtitle" v-model="condition.titleId.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.licensedToWork.show">
<FormItem :label="l('licensedToWork')" prop="licensedToWork">
<Dictionary code="User.base.workLicense" v-model="condition.licensedToWork.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.jobNo.show">
<FormItem :label="l('jobNo')" prop="jobNo">
<Input v-model="condition.jobNo.value"></Input>
</FormItem>
</Col>
<Col :span="24" v-if="condition.remark.show">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="condition.remark.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.roleTitles.show">
<FormItem :label="l('roleTitles')" prop="roleTitles">
<Input v-model="condition.roleTitles.value"></Input>
</FormItem>
</Col>
</Row>
</Form>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'Search',
data() {
return {
showDeptTree: false,
values: ['2001-01-01', '2015-12-05'],
condition: {
id: { op: 'Equal', value: null, show: false },
userName: { op: 'Equal', value: null, show: true },
cardTypeId: { op: 'Equal', value: null, show: false },
cardNo: { op: 'Equal', value: null, show: true },
gender: { op: 'Equal', value: null, show: true },
birthday: { op: 'Range', value: null, show: true },
degreeId: { op: 'Equal', value: null, show: true },
departmentId: { op: 'Equal', value: null, show: false },
national: { op: 'Equal', value: null, show: false },
status: { op: 'Equal', value: null, show: true },
creatorUserId: { op: 'Equal', value: null, show: false },
creationTime: { op: 'Range', value: null, show: false },
lastModifierUserId: { op: 'Equal', value: null, show: false },
lastModificationTime: { op: 'Range', value: null, show: false },
accountId: { op: 'Equal', value: null, show: false },
isDeleted: { op: 'Equal', value: null, show: false },
userType: { op: 'Equal', value:null, show: false },
phone: { op: 'Equal', value: null, show: true },
email: { op: 'Equal', value: null, show: true },
avatarUrl: { op: 'Equal', value: null, show: false },
enableEquip: { op: 'Equal', value: null, show: false },
licensedToWork: { op: 'Equal', value: null, show: true },
positionId: { op: 'Equal', value: null, show: true },
titleId: { op: 'Equal', value: null, show: true },
jobNo: { op: 'Equal', value: null, show: false },
remark: { op: 'Equal', value: null, show: false },
departmentTitle: { op: 'Equal', value: null, show: true },
departmentId: { op: 'Equal', value: null, show: false },
roleTitles: { op: 'Equal', value: null, show: true }
}
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = 'user' + '.' + key
return this.$t(key)
},
setDepartmentTitle(v, item) {
this.condition.departmentTitle.value = item.name
},
setTime(v) {
this.condition.birthday.value = v
},
},
watch: {}
}
</script>
<style lang="less">
.addUser {
.ivu-radio-wrapper {
vertical-align: top;
}
}
</style>
...@@ -122,7 +122,8 @@ export default { ...@@ -122,7 +122,8 @@ export default {
entity: { entity: {
gender: 1, gender: 1,
status: 1, status: 1,
property: false property: false,
userType:0
}, },
rules: { rules: {
userName: [{ userName: [{
......
...@@ -115,6 +115,10 @@ export default { ...@@ -115,6 +115,10 @@ export default {
op: "In", op: "In",
value: "" value: ""
}, },
userType: {
op: "Equal",
value: "0"
},
}, },
treeData: [], treeData: [],
tdHeight: "", tdHeight: "",
......
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
lastModificationTime: { op: 'Range', value: null, show: false }, lastModificationTime: { op: 'Range', value: null, show: false },
accountId: { op: 'Equal', value: null, show: false }, accountId: { op: 'Equal', value: null, show: false },
isDeleted: { op: 'Equal', value: null, show: false }, isDeleted: { op: 'Equal', value: null, show: false },
userType: { op: 'Equal', value: null, show: false }, userType: { op: 'Equal', value:'0', show: false },
phone: { op: 'Equal', value: null, show: true }, phone: { op: 'Equal', value: null, show: true },
email: { op: 'Equal', value: null, show: true }, email: { op: 'Equal', value: null, show: true },
avatarUrl: { op: 'Equal', value: null, show: false }, avatarUrl: { op: 'Equal', value: null, show: false },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment