luojie 2 months ago
parent
commit
d3298fa972
26 changed files with 1311 additions and 295 deletions
  1. +7
    -0
      src/api/business/systemLog/systemLog.js
  2. +0
    -7
      src/api/system/user.js
  3. +2
    -1
      src/components/Template/Table.vue
  4. +5
    -2
      src/lang/en.js
  5. +9
    -0
      src/lang/en/system/dict.js
  6. +79
    -54
      src/lang/en/template/pcr.js
  7. +4
    -1
      src/lang/zh.js
  8. +9
    -0
      src/lang/zh/system/dict.js
  9. +77
    -53
      src/lang/zh/template/pcr.js
  10. +4
    -4
      src/layout/components/AppMain.vue
  11. +1
    -1
      src/settings.js
  12. +3
    -1
      src/utils/menu.js
  13. +1
    -0
      src/utils/request.js
  14. +4
    -2
      src/views/business/comps/template/TemplateTable.vue
  15. +330
    -0
      src/views/business/comps/template/comps/pcr/PCR002.vue
  16. +1
    -1
      src/views/business/comps/template/comps/sp/SP001.vue
  17. +6
    -20
      src/views/business/comps/template/comps/sp/SP00456.vue
  18. +574
    -0
      src/views/business/comps/template/formConfig/PCRTableConfig.js
  19. +4
    -4
      src/views/business/comps/template/mixins/templateMixin.js
  20. +26
    -13
      src/views/business/systemLog/comp/czrz.vue
  21. +3
    -1
      src/views/business/template/list.vue
  22. +4
    -1
      src/views/system/dept/index.vue
  23. +66
    -56
      src/views/system/dict/data.vue
  24. +67
    -57
      src/views/system/dict/index.vue
  25. +15
    -13
      src/views/system/role/index.vue
  26. +10
    -3
      src/views/system/user/index.vue

+ 7
- 0
src/api/business/systemLog/systemLog.js View File

@ -7,3 +7,10 @@ export function systemLog_list(query) {
params: query params: query
}) })
} }
export function systemLog_czlxList(query) {
return request({
url: '/system/business/systemLog/czlxList',
method: 'get',
params: query
})
}

+ 0
- 7
src/api/system/user.js View File

@ -168,10 +168,3 @@ export function roleChangeList(query) {
params: query params: query
}) })
} }
export function roleChangeExport(data) {
return request({
url: '/system/business/roleChange/export',
method: 'post',
data
})
}

+ 2
- 1
src/components/Template/Table.vue View File

@ -15,7 +15,8 @@
</thead> </thead>
<tbody> <tbody>
<tr v-for="(ditem, index) in dataSource" :key="index"> <tr v-for="(ditem, index) in dataSource" :key="index">
<td v-for="(item) in columns" :key="item.prop" class="no-break">{{ ditem[item.prop] }}</td>
<td v-for="(item) in columns" :key="item.prop" class="no-break">
{{item.prop=='ndz'? (ditem['nd']+ditem['nddw']):ditem[item.prop] }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

+ 5
- 2
src/lang/en.js View File

@ -11,6 +11,8 @@ import dept from './en/system/dept'
import user from './en/system/user' import user from './en/system/user'
// 模板管理 // 模板管理
import template from './en/system/template' import template from './en/system/template'
// 字典管理
import dict from './en/system/dict'
// 公共模板语言配置 // 公共模板语言配置
import commonTemplate from './en/template/commonTemplate' import commonTemplate from './en/template/commonTemplate'
//色谱模板 //色谱模板
@ -91,7 +93,7 @@ export default {
close: 'Close', close: 'Close',
operate: 'Action', operate: 'Action',
delete: 'Delete', delete: 'Delete',
detail: 'Dtail',
detail: 'Detail',
placeholderInput: 'Please Input', placeholderInput: 'Please Input',
placeholderSelect: 'Please Select', placeholderSelect: 'Please Select',
confirmDelete: 'Confirm Delete?', confirmDelete: 'Confirm Delete?',
@ -151,7 +153,8 @@ export default {
dept, dept,
user, user,
template, template,
systemLog
systemLog,
dict
}, },
business: { business: {
home: home, home: home,

+ 9
- 0
src/lang/en/system/dict.js View File

@ -0,0 +1,9 @@
export default {
name: 'Name',
type: 'Type',
bq: 'Label',
jz: 'Value',
sort: 'Sort',
refresh: 'Refresh Cache'
}

+ 79
- 54
src/lang/en/template/pcr.js View File

@ -1,67 +1,92 @@
//色谱
//PCR
export default { export default {
// PCR分析溶液配制记录表 // PCR分析溶液配制记录表
pcr001:{
title: 'PCR分析溶液配制记录表',
pcr001: {
title: 'PCR分析溶液配制记录表'
}, },
// 生物样品分析储备液配制表
sp002:{
title: '生物样品分析储备液配制表',
// PCR分析工作液制备表
pcr002: {
title: 'PCR分析工作液制备表',
qsyry: 'Source Solution',
ysqsyrynd: 'Expected Concentration of Source Solution',
mbryyxzq: 'Validity Period of Target Solution',
mbrysxr: 'Expiration Date of Target Solution',
mbrybh: 'Target Solution ID',
qsrybh: 'Source Solution ID',
ysqsrytj: 'Expected Volume of Source Solution',
sjqsrytj: 'Actual Source Solution Volume',
ysxsytj: 'Expected Volume of Diluent',
sjxsytj: 'Actual Volume of Diluent',
ysmbrynd: 'Expected Concentration of Target Solution',
sjmbrynd: 'Actual Concentration of Target Solution',
ysmbrytj: 'Expected Volume of Target Solution',
sjmbrytj: 'Actual Volume of Target Solution',
mbryyxzq: 'Validity Period of Target Solution',
mbrysxr: 'Expiration Date of Target Solution',
ysysrybh: '预设原始溶液编号',
sjysrybh: '实际原始溶液编号',
ysysrynd: '预设原始溶液浓度',
sjysrynd: '实际原始溶液浓度',
ysysrytj: '预设原始溶液体积',
sjysrytj: '实际原始溶液体积',
yjxsytj: 'Expected Volume of Diluent',
sjxsytj: 'Actual Volume of Diluent',
sjqsyrynd: 'Actual Concentration of Source Solution',
xsy: 'Diluent',
rqcz: 'Container Material',
cctj: 'Storage Condition',
}, },
// 生物样品标曲工作液制备表 // 生物样品标曲工作液制备表
sp003:{
sp003: {
title: '生物样品标曲工作液制备表', title: '生物样品标曲工作液制备表',
rqcz: 'Container Material', rqcz: 'Container Material',
cctj:'Storage Condition',
qsyry:'Source Solution',
ysqsyrynd:'Expected Concentration of Source Solution',
sjqsyrynd:'Actual Concentration of Source Solution',
xsy:'Diluent',
qsbhstd:'STD Starting Number',
mbryyxzq:'Validity Period of Target Solution',
mbrysxr:'Expiration Date of Target Solution',
mbrybh:'Target Solution ID',
qsrybh:'Source Solution ID',
ysqsrytj:'Expected Volume of Source Solution',
sjqsrytj:'Actual Source Solution Volume',
ysxsytj:'Expected Volume of Diluent',
sjxsytj:'Actual Volume of Diluent',
ysmbrynd:'Expected Concentration of Target Solution',
sjmbrynd:'Actual Concentration of Target Solution',
ysmbrytj:'Expected Volume of Target Solution',
sjmbrytj:'Actual Volume of Target Solution',
cctj: 'Storage Condition',
qsyry: 'Source Solution',
ysqsyrynd: 'Expected Concentration of Source Solution',
qsbhstd: 'STD Starting Number',
mbrybh: 'Target Solution ID',
qsrybh: 'Source Solution ID',
ysqsrytj: 'Expected Volume of Source Solution',
sjqsrytj: 'Actual Source Solution Volume',
ysxsytj: 'Expected Volume of Diluent',
sjxsytj: 'Actual Volume of Diluent',
ysmbrynd: 'Expected Concentration of Target Solution',
sjmbrynd: 'Actual Concentration of Target Solution',
ysmbrytj: 'Expected Volume of Target Solution',
sjmbrytj: 'Actual Volume of Target Solution'
}, },
// 生物样品内标工作液制备表
sp00456:{
// 生物样品内标工作液制备表
sp00456: {
title: '生物样品内标工作液制备表', title: '生物样品内标工作液制备表',
mbrybh:'Target Solution ID',
qsrybh:'Source Solution ID',
ysqsrytj:'Expected Volume of Source Solution',
sjqsrytj:'Actual Source Solution Volume',
ysxsytj:'Expected Volume of Diluent',
sjxsytj:'Actual Volume of Diluent',
ysmbrynd:'Expected Concentration of Target Solution',
sjmbrynd:'Actual Concentration of Target Solution',
ysmbrytj:'Expected Volume of Target Solution',
sjmbrytj:'Actual Volume of Target Solution',
mbryyxzq:'Validity Period of Target Solution',
mbrysxr:'Expiration Date of Target Solution',
ysysrybh:'预设原始溶液编号',
sjysrybh:'实际原始溶液编号',
ysysrynd:'预设原始溶液浓度',
sjysrynd:'实际原始溶液浓度',
ysysrytj:'预设原始溶液体积',
sjysrytj:'实际原始溶液体积',
yjxsytj:'Expected Volume of Diluent',
sjxsytj:'Actual Volume of Diluent',
qsyry:'Source Solution',
ysqsyrynd:'Expected Concentration of Source Solution',
sjqsyrynd:'Actual Concentration of Source Solution',
xsy:'Diluent',
mbrybh: 'Target Solution ID',
qsrybh: 'Source Solution ID',
ysqsrytj: 'Expected Volume of Source Solution',
sjqsrytj: 'Actual Source Solution Volume',
ysxsytj: 'Expected Volume of Diluent',
sjxsytj: 'Actual Volume of Diluent',
ysmbrynd: 'Expected Concentration of Target Solution',
sjmbrynd: 'Actual Concentration of Target Solution',
ysmbrytj: 'Expected Volume of Target Solution',
sjmbrytj: 'Actual Volume of Target Solution',
mbryyxzq: 'Validity Period of Target Solution',
mbrysxr: 'Expiration Date of Target Solution',
ysysrybh: '预设原始溶液编号',
sjysrybh: '实际原始溶液编号',
ysysrynd: '预设原始溶液浓度',
sjysrynd: '实际原始溶液浓度',
ysysrytj: '预设原始溶液体积',
sjysrytj: '实际原始溶液体积',
yjxsytj: 'Expected Volume of Diluent',
sjxsytj: 'Actual Volume of Diluent',
sjqsyrynd: 'Actual Concentration of Source Solution',
xsy: 'Diluent',
rqcz: 'Container Material', rqcz: 'Container Material',
cctj:'Storage Condition',
}, },
// 生物样品分析方法学样品制备表-准确度与精密度 // 生物样品分析方法学样品制备表-准确度与精密度
sp008: { sp008: {

+ 4
- 1
src/lang/zh.js View File

@ -11,6 +11,8 @@ import dept from './zh/system/dept'
import user from './zh/system/user' import user from './zh/system/user'
// 模板管理 // 模板管理
import template from './zh/system/template' import template from './zh/system/template'
// 字典管理
import dict from './zh/system/dict'
// 公共模板语言配置 // 公共模板语言配置
import commonTemplate from './zh/template/commonTemplate' import commonTemplate from './zh/template/commonTemplate'
//色谱模板 //色谱模板
@ -147,7 +149,8 @@ export default {
dept, dept,
user, user,
template, template,
systemLog
systemLog,
dict
}, },
business: { business: {
home: home, home: home,

+ 9
- 0
src/lang/zh/system/dict.js View File

@ -0,0 +1,9 @@
export default {
name: '名称',
type: '类型',
bq: '标签',
jz: '键值',
sort: '排序',
refresh: '刷新缓存'
}

+ 77
- 53
src/lang/zh/template/pcr.js View File

@ -1,67 +1,91 @@
//色谱
//PCR
export default { export default {
// PCR分析溶液配制记录表 // PCR分析溶液配制记录表
pcr001:{
title: 'PCR分析溶液配制记录表',
pcr001: {
title: 'PCR分析溶液配制记录表'
}, },
// 生物样品分析储备液配制表
sp002:{
title: '生物样品分析储备液配制表',
// PCR分析工作液制备表
pcr002: {
title: 'PCR分析工作液制备表',
mbrybh: '目标溶液编号',
qsrybh: '起始溶液编号',
ysqsrytj: '预设起始溶液体积',
sjqsrytj: '实际起始溶液体积',
ysxsytj: '预设稀释液体积',
sjxsytj: '实际稀释液体积',
ysmbrynd: '预设目标溶液浓度',
sjmbrynd: '实际目标溶液浓度',
ysmbrytj: '预设目标溶液体积',
sjmbrytj: '实际目标溶液体积',
mbryyxzq: '目标溶液有效周期',
mbrysxr: '目标溶液失效日',
ysysrybh: '预设原始溶液编号',
sjysrybh: '实际原始溶液编号',
ysysrynd: '预设原始溶液浓度',
sjysrynd: '实际原始溶液浓度',
ysysrytj: '预设原始溶液体积',
sjysrytj: '实际原始溶液体积',
yjxsytj: '预计稀释液体积',
sjxsytj: '实际稀释液体积',
qsyry: '起始源溶液',
ysqsyrynd: '预设起始源溶液浓度',
sjqsyrynd: '实际起始源溶液浓度',
xsy: '稀释液',
rqcz: '容器材质',
cctj: '存储条件'
}, },
// 生物样品标曲工作液制备表 // 生物样品标曲工作液制备表
sp003:{
sp003: {
title: '生物样品标曲工作液制备表', title: '生物样品标曲工作液制备表',
rqcz: '容器材质', rqcz: '容器材质',
cctj:'存储条件',
qsyry:'起始源溶液',
ysqsyrynd:'预设起始源溶液浓度',
sjqsyrynd:'实际起始源溶液浓度',
xsy:'稀释液',
qsbhstd:'起始编号STD',
mbryyxzq:'目标溶液有效周期',
mbrysxr:'目标溶液失效日',
mbrybh:'目标溶液编号',
qsrybh:'起始溶液编号',
ysqsrytj:'预设起始溶液体积',
sjqsrytj:'实际起始溶液体积',
ysxsytj:'预设稀释液体积',
sjxsytj:'实际稀释液体积',
ysmbrynd:'预设目标溶液浓度',
sjmbrynd:'实际目标溶液浓度',
ysmbrytj:'预设目标溶液体积',
sjmbrytj:'实际目标溶液体积',
cctj: '存储条件',
qsyry: '起始源溶液',
ysqsyrynd: '预设起始源溶液浓度',
sjqsyrynd: '实际起始源溶液浓度',
xsy: '稀释液',
qsbhstd: '起始编号STD',
mbryyxzq: '目标溶液有效周期',
mbrysxr: '目标溶液失效日',
mbrybh: '目标溶液编号',
qsrybh: '起始溶液编号',
ysqsrytj: '预设起始溶液体积',
sjqsrytj: '实际起始溶液体积',
ysxsytj: '预设稀释液体积',
sjxsytj: '实际稀释液体积',
ysmbrynd: '预设目标溶液浓度',
sjmbrynd: '实际目标溶液浓度',
ysmbrytj: '预设目标溶液体积',
sjmbrytj: '实际目标溶液体积'
}, },
// 生物样品内标工作液制备表 // 生物样品内标工作液制备表
sp00456:{
sp00456: {
title: '生物样品内标工作液制备表', title: '生物样品内标工作液制备表',
mbrybh:'目标溶液编号',
qsrybh:'起始溶液编号',
ysqsrytj:'预设起始溶液体积',
sjqsrytj:'实际起始溶液体积',
ysxsytj:'预设稀释液体积',
sjxsytj:'实际稀释液体积',
ysmbrynd:'预设目标溶液浓度',
sjmbrynd:'实际目标溶液浓度',
ysmbrytj:'预设目标溶液体积',
sjmbrytj:'实际目标溶液体积',
mbryyxzq:'目标溶液有效周期',
mbrysxr:'目标溶液失效日',
ysysrybh:'预设原始溶液编号',
sjysrybh:'实际原始溶液编号',
ysysrynd:'预设原始溶液浓度',
sjysrynd:'实际原始溶液浓度',
ysysrytj:'预设原始溶液体积',
sjysrytj:'实际原始溶液体积',
yjxsytj:'预计稀释液体积',
sjxsytj:'实际稀释液体积',
qsyry:'起始源溶液',
ysqsyrynd:'预设起始源溶液浓度',
sjqsyrynd:'实际起始源溶液浓度',
xsy:'稀释液',
mbrybh: '目标溶液编号',
qsrybh: '起始溶液编号',
ysqsrytj: '预设起始溶液体积',
sjqsrytj: '实际起始溶液体积',
ysxsytj: '预设稀释液体积',
sjxsytj: '实际稀释液体积',
ysmbrynd: '预设目标溶液浓度',
sjmbrynd: '实际目标溶液浓度',
ysmbrytj: '预设目标溶液体积',
sjmbrytj: '实际目标溶液体积',
mbryyxzq: '目标溶液有效周期',
mbrysxr: '目标溶液失效日',
ysysrybh: '预设原始溶液编号',
sjysrybh: '实际原始溶液编号',
ysysrynd: '预设原始溶液浓度',
sjysrynd: '实际原始溶液浓度',
ysysrytj: '预设原始溶液体积',
sjysrytj: '实际原始溶液体积',
yjxsytj: '预计稀释液体积',
sjxsytj: '实际稀释液体积',
qsyry: '起始源溶液',
ysqsyrynd: '预设起始源溶液浓度',
sjqsyrynd: '实际起始源溶液浓度',
xsy: '稀释液',
rqcz: '容器材质', rqcz: '容器材质',
cctj:'存储条件',
cctj: '存储条件'
}, },
// 生物样品分析方法学样品制备表-准确度与精密度 // 生物样品分析方法学样品制备表-准确度与精密度
sp008: { sp008: {

+ 4
- 4
src/layout/components/AppMain.vue View File

@ -47,7 +47,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
/* 50= navbar 50 */ /* 50= navbar 50 */
min-height: calc(100vh - 100px);
min-height: calc(100vh - 84px);
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@ -57,7 +57,7 @@ export default {
.fixed-header + .app-main { .fixed-header + .app-main {
overflow-y: auto; overflow-y: auto;
scrollbar-gutter: auto; scrollbar-gutter: auto;
height: calc(100vh - 100px);
height: calc(100vh - 84px);
min-height: 0px; min-height: 0px;
} }
@ -72,12 +72,12 @@ export default {
.hasTagsView { .hasTagsView {
.app-main { .app-main {
/* 84 = navbar + tags-view = 50 + 34 */ /* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 100px);
min-height: calc(100vh - 84px);
} }
.fixed-header + .app-main { .fixed-header + .app-main {
margin-top: 84px; margin-top: 84px;
height: calc(100vh - 100px);
height: calc(100vh -84px);
min-height: 0px; min-height: 0px;
} }
} }

+ 1
- 1
src/settings.js View File

@ -32,7 +32,7 @@ module.exports = {
/** /**
* 是否固定头部 * 是否固定头部
*/ */
fixedHeader: false,
fixedHeader: true,
/** /**
* 是否显示logo * 是否显示logo

+ 3
- 1
src/utils/menu.js View File

@ -34,7 +34,9 @@ let menuObj = {
'部门/学科管理': 'Dep & Dis', '部门/学科管理': 'Dep & Dis',
模板管理: 'Function', 模板管理: 'Function',
字典管理: 'Term Book', 字典管理: 'Term Book',
日志管理: 'Log'
日志管理: 'Log',
字典数据: 'Term Book Data'
} }
export function getMenuName(menuName) { export function getMenuName(menuName) {
if (!this.$i18n.locale || this.$i18n.locale === 'zh_CN') { if (!this.$i18n.locale || this.$i18n.locale === 'zh_CN') {

+ 1
- 0
src/utils/request.js View File

@ -24,6 +24,7 @@ const service = axios.create({
// request拦截器 // request拦截器
service.interceptors.request.use( service.interceptors.request.use(
(config) => { (config) => {
config.headers['lang'] = store.getters.language
// 是否需要设置 token // 是否需要设置 token
const isToken = (config.headers || {}).isToken === false const isToken = (config.headers || {}).isToken === false
// 是否需要防止数据重复提交 // 是否需要防止数据重复提交

+ 4
- 2
src/views/business/comps/template/TemplateTable.vue View File

@ -46,6 +46,7 @@ import MJYLQSQD from "./comps/gsp/MJYLQSQD.vue";
// PCR // PCR
import PCR001 from "./comps/pcr/PCR001.vue"; import PCR001 from "./comps/pcr/PCR001.vue";
import PCR002 from "./comps/pcr/PCR002.vue";
export default { export default {
name: "TemplateTable", name: "TemplateTable",
@ -57,7 +58,7 @@ export default {
// //
SP001, SP002, SP003, SP00456, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018, SP001, SP002, SP003, SP00456, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018,
// PCR // PCR
PCR001
PCR001, PCR002
}, },
props: { props: {
sn: { sn: {
@ -104,7 +105,8 @@ export default {
'SYWZPZJHB': 'SYWZPZJHB', 'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD', 'MJYLQSQD': 'MJYLQSQD',
//PCR //PCR
'PCR001': 'PCR001'
'PCR001': 'PCR001',
'PCR002': 'PCR002'
} }
} }
return this.componentMap || "Demo" return this.componentMap || "Demo"

+ 330
- 0
src/views/business/comps/template/comps/pcr/PCR002.vue View File

@ -0,0 +1,330 @@
<!-- PCR分析溶液配制记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
$t('template.pcr.pcr002.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz"
v-if="resourceWz.length > 0" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<CustomTable @blur="onHandleTableBlur"
:ref="`tableRef`" :columns="tableStepColumns"
:formData="formData" :prefixKey="`table`" fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion
:fillType="fillType"
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"
@subPackageSubmit="subPackageSubmit"
@startConfig="startConfig"
@configComplete="configComplete"
></TableOpertaion>
</template>
</CustomTable>
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import { getLadderColumnsConfig } from "../../formConfig/PCRTableConfig.js";
export default {
name: "PCR001",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
tableStepColumns() {
return getLadderColumnsConfig(this);
},
//
storageFormConfig() {
return [
{
type: "conditionItem",
config: {
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: 'template.common.testName',
type: "input",
disabled: true,
},
studySn: {
label: 'template.common.testNumber',
type: "input",
disabled: true,
},
}
},
{
type: "conditionItem",
label: 'template.common.testConfigurationConditions',
config: {
pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
stepFormConfig() {
return [
{
type: 'step',
config: {
startSolution: {
label: 'template.pcr.pcr002.qsyry',
type: 'input',
fillType: 'preFill',
subType: 'clickable',
subKey: 'subStartSolution',
subFillType: 'actFill',
maxlength: 20
},
targetStartSolution: {
label: 'template.pcr.pcr002.ysqsyrynd',
type: 'inputNumber',
subType: 'select',
fillType: 'preFill',
subOptions: this.getDictOptions('business_nddw'),
subKey: 'subTargetStartSolution',
maxlength: 10
},
targetAcSolution: {
label: 'template.pcr.pcr002.sjqsyrynd',
type: 'input',
fillType: 'actFill',
disabled: true,
maxlength: 10,
compareTo: 'targetStartSolution', //
},
solution: {
label: 'template.pcr.pcr002.xsy',
type: 'input',
fillType: 'preFill',
subType: 'clickable',
subKey: 'subSolution',
subFillType: 'actFill',
maxlength: 20
},
stepStorageCondition: {
label: 'template.pcr.pcr002.cctj',
type: 'select',
fillType: 'preFill',
options: this.getDictOptions('business_cctj'),
otherCode: 'stepStorageConditionOther'
},
effectivePeriod: {
label: 'template.pcr.pcr002.mbryyxzq',
type: 'input',
subType: 'select',
subKey: 'effectivePeriodUnit',
fillType: 'preFill',
subOptions: this.getDictOptions('business_yxqdw')
},
expireDate: {
label: 'template.pcr.pcr002.mbrysxr',
type: 'input'
}
}
}
]
},
},
data() {
return {
formData: {}
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
if(this.fillType === "actFill"){
this.getCode(formData);
}
},
methods: {
//
async getCode(v){
const {stepTableFormData = []} = v;
if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){
let postSn = []
for(let i=0;i<stepTableFormData.length;i++){
postSn.push({
pre:stepTableFormData[i].targetSolutionCode,
type:1
})
}
const result = await getLatestSnArr(postSn)
if(result.code == 200){
for(let i=0;i<stepTableFormData.length;i++){
this.$refs.tableRef.updateDataSourceByRowIndex(i,{
subTargetSolutionCode: result.data[i],
})
}
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
setTimeout(() => {
EventBus.$emit('onModifyRecord', params,)
}, 10);
}
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
if (this.fillType === "actFill") {
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode + content.targetCodeSn,
ph: '',
ndz: content.targetActConcentration + content.targetActConcentrationUnit,
nd: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: content.expireDate,
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
}
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
return content;
},
//
async onSave() {
let content = this.$refs.stepRef.getStepResource();
console.log(content);
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
</style>

+ 1
- 1
src/views/business/comps/template/comps/sp/SP001.vue View File

@ -27,7 +27,7 @@
</div> </div>
</div> </div>
</div> </div>
<button @click="onSave">保存</button>
<!-- <button @click="onSave">保存</button> -->
</div> </div>
</template> </template>

+ 6
- 20
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -202,6 +202,7 @@ export default {
kcdw: dw, kcdw: dw,
} }
}) })
debugger
let postData = { let postData = {
studyId: this.formData.studyId, studyId: this.formData.studyId,
studyFormId: this.formData.id, studyFormId: this.formData.id,
@ -227,6 +228,7 @@ export default {
const { rowData, headerSelectFields } = val; const { rowData, headerSelectFields } = val;
//(+) //(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
debugger
let postData = { let postData = {
mc: null, mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
@ -407,6 +409,7 @@ export default {
const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution") || 0;// const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution") || 0;//
if (targetAcSolution) { if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution); const volResult = this.updateSjmbrynd(item, targetAcSolution);
debugger
if (!volResult) { if (!volResult) {
return return
} }
@ -507,6 +510,7 @@ export default {
} }
console.log(volResult.actNd, "actNd") console.log(volResult.actNd, "actNd")
item.actSolutionVolume = volResult.actVol; item.actSolutionVolume = volResult.actVol;
debugger
item.actSolutionConcentration = volResult.actNd; item.actSolutionConcentration = volResult.actNd;
// stepTableRef // stepTableRef
}) })
@ -595,7 +599,7 @@ export default {
debugger debugger
let tmpResource = [] let tmpResource = []
if (this.fillType === "actFill") { if (this.fillType === "actFill") {
//
//
if (content.ladderConfigs && content.ladderConfigs.length > 0) { if (content.ladderConfigs && content.ladderConfigs.length > 0) {
for (let i = 0; i < content.ladderConfigs.length; i++) { for (let i = 0; i < content.ladderConfigs.length; i++) {
let ladderConfigs = content.ladderConfigs[i] let ladderConfigs = content.ladderConfigs[i]
@ -689,7 +693,7 @@ export default {
} }
} }
} }
//
//
if (content.paralleConfigs && content.paralleConfigs.length > 0) { if (content.paralleConfigs && content.paralleConfigs.length > 0) {
for (let i = 0; i < content.paralleConfigs.length; i++) { for (let i = 0; i < content.paralleConfigs.length; i++) {
let paralleConfigs = content.paralleConfigs[i] let paralleConfigs = content.paralleConfigs[i]
@ -742,24 +746,6 @@ export default {
yxzq: stepTableFormData[j].targetSolutionCycle, yxzq: stepTableFormData[j].targetSolutionCycle,
yxzqdw: stepTableFormData[j].targetSolutionCyclePrecision, yxzqdw: stepTableFormData[j].targetSolutionCyclePrecision,
}) })
//
tmpResource.push({
mc: null,
bh: paralleConfigs.subStartSolution,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: stepTableFormData[j].actSolutionVolume,
syldw: paralleConfigs.headerSelectFields.actSolutionVolumeUnit,
yxzq: null,
yxzqdw: null,
})
// //
tmpResource.push({ tmpResource.push({
mc: null, mc: null,

+ 574
- 0
src/views/business/comps/template/formConfig/PCRTableConfig.js View File

@ -0,0 +1,574 @@
// 阶梯配置表格列配置
export const getLadderColumnsConfig = ($this) => {
return [
{
label: 'template.pcr.pcr002.mbrybh',
prop: 'targetSolutionCode',
bodyType: 'input',
bodySubType: 'span',
bodySubKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
width: 280,
myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段
maxVolumeField: "actSolutionVolume",//分装的最大量字段
maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段
},
{
label: 'template.pcr.pcr002.qsrybh',
prop: 'startSolutionCode',
width: 280,
bodyType: 'input',
bodyFillType: 'actFill',
bodyMaxlength: 10
},
{
label: 'template.pcr.pcr002.ysqsrytj',
prop: 'targetStartSolutionVolume',
width: 280,
headerSelectKey: 'targetStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'targetStartSolutionVolumePrecision',
bodyFillType: 'preFill',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'targetStartSolutionVolumePrecision',
bodyMaxlength: 10,
bodyDisabled: true,
bodySubPlaceholder: 'template.common.xswsPlaceholder'
},
{
label: 'template.pcr.pcr002.sjqsrytj',
prop: 'actStartSolutionVolume',
width: 280,
headerSelectKey: 'actStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
copyFrom: 'targetStartSolutionVolume', //复制哪个字段
compareTo: 'targetStartSolutionVolume' //比较哪个字段
},
{
label: 'template.pcr.pcr002.ysxsytj',
prop: 'targetDiluentVolume',
width: 280,
headerSelectKey: 'targetDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'targetDiluentVolumePrecision',
bodyFillType: 'preFill',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'targetDiluentVolumePrecision',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder'
},
{
label: 'template.pcr.pcr002.sjxsytj',
prop: 'actDiluentVolume',
width: 280,
headerSelectKey: 'actDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
copyFrom: 'targetDiluentVolume', //复制哪个字段
compareTo: 'targetDiluentVolume', //比较哪个字段
},
{
label: 'template.pcr.pcr002.ysmbrynd',
prop: 'targetSolutionConcentration',
width: 280,
headerSelectKey: 'targetSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.pcr.pcr002.sjmbrynd',
prop: 'actSolutionConcentration',
width: 280,
headerSelectKey: 'actSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionConcentrationPrecision',
bodyFillType: 'actFill',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'actSolutionConcentrationPrecision',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
compareTo: 'targetSolutionConcentration', //比较哪个字段
},
{
label: 'template.pcr.pcr002.ysmbrytj',
prop: 'targetSolutionVolume',
width: 280,
headerSelectKey: 'targetSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.pcr.pcr002.sjmbrytj',
prop: 'actSolutionVolume',
width: 280,
headerSelectKey: 'actSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionVolumePrecision',
bodyFillType: 'actFill',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'actSolutionVolumePrecision',
bodyMaxlength: 10,
// copyFrom: 'targetSolutionVolume', //复制哪个字段
bodySubPlaceholder: 'template.common.xswsPlaceholder',
compareTo: 'targetSolutionVolume', //比较哪个字段
}
]
}
// 平行配置表格列配置
export const getParallelColumnsConfig = ($this) => {
const sn = $this.sn;
let o = {
"SP004":"business_sp_nbgzy",
"SP005":"business_sp_zkgzy",
"SP006":"business_sp_bzqxzkypzbb",
}
return [
{
label: 'template.sp.sp00456.mbrybh',
prop: 'targetSolutionCode',
bodyType: 'select',
bodyOptions: $this.getDictOptions(o[sn]),
bodySubType: 'span',
bodySubKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段
maxVolumeField: "actSolutionVolume",//分装的最大量字段
maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段
width: 280
},
{
label: 'template.sp.sp00456.ysmbrynd',
prop: 'targetSolutionConcentration',
width: 280,
headerSelectKey: 'targetSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.sp.sp00456.sjmbrynd',
prop: 'actSolutionConcentration',
width: 280,
headerSelectKey: 'actSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionConcentrationPrecision',
bodyFillType: 'actFill',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'actSolutionConcentrationPrecision',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
compareTo: 'targetSolutionConcentration', //比较哪个字段
},
{
label: 'template.sp.sp00456.ysmbrytj',
prop: 'targetSolutionVolume',
width: 280,
headerSelectKey: 'targetSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.sp.sp00456.sjmbrytj',
prop: 'actSolutionVolume',
width: 280,
headerSelectKey: 'actSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodySubType: 'inputNumber',
bodySubKey: 'actSolutionVolumePrecision',
bodyFillType: 'actFill',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'actSolutionVolumePrecision',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
compareTo: 'targetSolutionVolume', //比较哪个字段
},
{
label: 'template.sp.sp00456.mbryyxzq',
prop: 'targetSolutionCycle',
width: 280,
fillType: 'preFill',
bodyType: 'inputNumber',
bodySubType: 'select',
showBodySub: true,
bodySubKey: 'targetSolutionCyclePrecision',
bodySubOptions: $this.getDictOptions('business_yxqdw'),
bodyFillType: 'preFill',
bodySubFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.sp.sp00456.mbrysxr',
prop: 'targetSolutionExpirationDate',
width: 180,
bodyType: 'span'
},
{
label: 'template.sp.sp00456.ysysrybh',
prop: 'startSolutionCode',
width: 280,
bodyType: 'input',
bodyFillType: 'preFill'
},
{
label: 'template.sp.sp00456.sjysrybh',
prop: 'actStartSolutionCode',
width: 280,
bodyType: 'clickable',
bodyFillType: 'actFill',
compareTo: 'startSolutionCode', //比较哪个字段
},
{
label: 'template.sp.sp00456.ysysrynd',
prop: 'targetStartSolutionConcentration',
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodySubType: 'select',
bodySubKey: 'targetStartSolutionConcentrationPrecision',
bodySubOptions: $this.getDictOptions('business_nddw'),
bodySubFillType: 'preFill',
bodyMaxlength: 10,
showBodySub: true
},
{
label: 'template.sp.sp00456.sjysrynd',
prop: 'targetAcSolution',
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyDisabled: true,
compareTo: 'targetStartSolutionConcentration', //比较哪个字段
},
{
label: 'template.sp.sp00456.ysysrytj',
prop: 'targetStartSolutionVolume',
headerSelectKey: 'targetStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodySubType: 'inputNumber',
bodySubKey: 'targetStartSolutionVolumePrecision',
bodySubFillType: 'preFill',
bodyMaxlength: 10,
bodyPrecisionKey: 'targetStartSolutionVolumePrecision',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
bodyDisabled: true,
showBodySub: true,
showBodySub: $this.fillType === 'preFill'
},
{
label: 'template.sp.sp00456.sjysrytj',
prop: 'actStartSolutionVolume',
headerSelectKey: 'actStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
compareTo: 'targetStartSolutionVolume', //比较哪个字段
copyFrom: 'targetStartSolutionVolume' //复制哪个字段
},
{
label: 'template.sp.sp00456.yjxsytj',
prop: 'targetDiluentVolume',
headerSelectKey: 'preDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodySubType: 'inputNumber',
bodySubKey: 'targetDiluentVolumePrecision',
bodySubFillType: 'preFill',
bodyMaxlength: 10,
bodyPrecisionKey: 'targetDiluentVolumePrecision',
bodySubPlaceholder: 'template.common.xswsPlaceholder',
bodyDisabled: true,
showBodySub: $this.fillType === 'preFill'
},
{
label: 'template.sp.sp00456.sjxsytj',
prop: 'actDiluentVolume',
headerSelectKey: 'actDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
copyFrom:"targetDiluentVolume",
compareTo: 'targetDiluentVolume' //比较哪个字段
}
]
}
//阶梯配置
export const getLadderFormConfig = ($this) => {
return [
{
type: 'step',
config: {
startSolution: {
label: 'template.sp.sp00456.qsyry',
type: 'input',
fillType: 'preFill',
subType: 'clickable',
subKey: 'subStartSolution',
subFillType: 'actFill',
maxlength: 20
},
targetStartSolution: {
label: 'template.sp.sp00456.ysqsyrynd',
type: 'inputNumber',
subType: 'select',
fillType: 'preFill',
subOptions: $this.getDictOptions('business_nddw'),
subKey: 'subTargetStartSolution',
maxlength: 10
},
targetAcSolution: {
label: 'template.sp.sp00456.sjqsyrynd',
type: 'input',
fillType: 'actFill',
disabled: true,
maxlength: 10,
compareTo: 'targetStartSolution', //比较哪个字段
},
solution: {
label: 'template.sp.sp00456.xsy',
type: 'input',
fillType: 'preFill',
subType: 'clickable',
subKey: 'subSolution',
subFillType: 'actFill',
maxlength: 20
},
stepStorageCondition: {
label: 'template.sp.sp00456.cctj',
type: 'select',
fillType: 'preFill',
options: $this.getDictOptions('business_cctj'),
otherCode: 'stepStorageConditionOther'
},
effectivePeriod: {
label: 'template.sp.sp00456.mbryyxzq',
type: 'input',
subType: 'select',
subKey: 'effectivePeriodUnit',
fillType: 'preFill',
subOptions: $this.getDictOptions('business_yxqdw')
},
expireDate: {
label: 'template.sp.sp00456.mbrysxr',
type: 'input'
}
}
}
]
}
//试验基本信息
export const getBaseInfoFormConfig = ($this) => {
return [
{
type: 'cardItem',
config: {
studyMc: {
label: 'template.common.testName',
type: 'input',
disabled: true
},
studySn: {
label: 'template.common.testNumber',
type: 'input',
disabled: true
},
methodCode: {
label: 'template.common.methodCode',
type: 'input',
fillType: 'preFill',
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: 'inputNumber',
fillType: 'actFill',
prepend: 'V',
maxlength: 50
}
}
},
{
type: 'conditionItem',
label: 'template.common.testConfigurationConditions',
config: {
pre: {
label: 'template.common.preFill',
type: 'select',
multiple: true,
fillType: 'preFill',
options: $this.getDictOptions('business_pztj'),
otherCode: 'preOther'
},
act: {
label: 'template.common.actualFill',
type: 'select',
fillType: 'actFill',
otherCode: 'actOther',
multiple: true,
options: $this.getDictOptions('business_pztj'),
compareTo: 'pre'
}
}
},
{
type: 'conditionItem',
label: 'template.sp.sp00456.rqcz',
config: {
containerMaterial: {
label: 'template.sp.sp00456.rqcz',
type: 'select',
options: $this.getDictOptions('business_rqcz'),
fillType: 'actFill',
multiple: true,
otherCode: 'containerMaterialOther'
}
}
},
{
type: 'cellItem',
label: 'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: 'input'
},
endDate: {
label: 'template.common.endTime',
type: 'input'
}
}
}
]
}
//备注config
export const getRemarkFormConfig = () => {
return [
{
type: 'cellItem',
config: {
remark: {
label: '',
type: 'textarea',
fillType: 'actFill',
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
}
//存储条件
export const getStorageConditionFormConfig = ($this) => {
return [
{
type: 'conditionItem',
config: {
storageCondition: {
label: 'template.sp.sp00456.cctj',
type: 'select',
fillType: 'preFill',
options: $this.getDictOptions('business_cctj'),
otherCode: 'othersSorageCondition'
}
}
}
]
}
//并行步骤配置
export const getParalleStepFormConfig = ($this) => {
return [
{
type: 'step',
config: {
solution: {
label: 'template.sp.sp00456.xsy',
type: 'input',
fillType: 'preFill',
subType: 'clickable',
subKey: 'subSolution',
subFillType: 'actFill',
maxlength: 20
},
paralleStepStorageCondition: {
label: 'template.sp.sp00456.cctj',
type: 'select',
fillType: 'preFill',
options: $this.getDictOptions('business_cctj'),
otherCode: 'paralleStepStorageConditionOther'
}
}
}
]
}

+ 4
- 4
src/views/business/comps/template/mixins/templateMixin.js View File

@ -397,18 +397,18 @@ export default {
return false return false
} }
const actNd = ( const actNd = (
targetAcSolution /
actStartSolutionVolume /
actVol
parseFloat(targetAcSolution) /
parseFloat(actStartSolutionVolume) /
parseFloat(actVol)
).toFixed(precision) ).toFixed(precision)
const nd = actNd === 'Infinity' ? 0 : Number(actNd) const nd = actNd === 'Infinity' ? 0 : Number(actNd)
console.log(actNd, targetAcSolution, actStartSolutionVolume, actVol, "actNd") console.log(actNd, targetAcSolution, actStartSolutionVolume, actVol, "actNd")
// item.actSolutionConcentration = actNd === 'Infinity' ? 0 : actNd // item.actSolutionConcentration = actNd === 'Infinity' ? 0 : actNd
return { actVol:Number(actVol), actNd: nd } return { actVol:Number(actVol), actNd: nd }
}, },
//更新起始溶液体积时,计算目标溶液预计浓度 //更新起始溶液体积时,计算目标溶液预计浓度
updateTargetStartSolutionVolume(item, volume) { updateTargetStartSolutionVolume(item, volume) {
debugger
const precision = item.targetStartSolutionVolumePrecision || 0 const precision = item.targetStartSolutionVolumePrecision || 0
const concentration = item.targetSolutionConcentration || 0 const concentration = item.targetSolutionConcentration || 0
const targetVolume = item.targetSolutionVolume || 0 const targetVolume = item.targetSolutionVolume || 0

+ 26
- 13
src/views/business/systemLog/comp/czrz.vue View File

@ -4,7 +4,7 @@
<el-form :model="searchForm" ref="searchForm" :inline="true" label-width="80px"> <el-form :model="searchForm" ref="searchForm" :inline="true" label-width="80px">
<el-form-item :label="$t('page.system.systemLog.czr')" prop="qmrMc"> <el-form-item :label="$t('page.system.systemLog.czr')" prop="qmrMc">
<el-input v-model="searchForm.qmrMc" :placeholder="$t('form.placeholderInput')" clearable <el-input v-model="searchForm.qmrMc" :placeholder="$t('form.placeholderInput')" clearable
style="width: 150px" />
style="width: 120px" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('page.system.systemLog.czsj')"> <el-form-item :label="$t('page.system.systemLog.czsj')">
<el-date-picker v-model="daterange" clearable type="daterange" range-separator="-" :start-placeholder="$t('page.business.study.study.startDate')" <el-date-picker v-model="daterange" clearable type="daterange" range-separator="-" :start-placeholder="$t('page.business.study.study.startDate')"
@ -16,29 +16,27 @@
:placeholder="$t('form.placeholderSelect')" :placeholder="$t('form.placeholderSelect')"
clearable clearable
style="width: 150px" style="width: 150px"
filterable
@change="search" @change="search"
> >
<el-option :label="$t('page.business.study.study.sqgd')" :value="$t('page.business.study.study.sqgd')" />
<el-option :label="$t('page.business.study.study.tygd')" :value="$t('page.business.study.study.tygd')" />
<el-option :label="$t('page.business.study.study.jjgd')" :value="$t('page.business.study.study.jjgd')" />
<el-option :label="$t('page.business.study.study.sqjd')" :value="$t('page.business.study.study.sqjd')" />
<el-option :label="$t('page.business.study.study.tyjd')" :value="$t('page.business.study.study.tyjd')" />
<el-option :label="$t('page.business.study.study.jjjd')" :value="$t('page.business.study.study.jjjd')" />
<el-option :label="$t('page.business.study.study.sqjy')" :value="$t('page.business.study.study.sqjy')" />
<el-option :label="$t('page.business.study.study.tyjy')" :value="$t('page.business.study.study.tyjy')" />
<el-option :label="$t('page.business.study.study.jjjy')" :value="$t('page.business.study.study.jjjy')" />
<el-option :label="$t('page.business.study.study.qrgh')" :value="$t('page.business.study.study.qrgh')" />
<template v-if="$i18n.locale === 'zh_CN'">
<el-option v-for="(item,index) in czlxList" :key="index" :label="item" :value="item" />
</template>
<template v-else>
<el-option v-for="(item,index) in czlxListEn" :key="index" :label="item" :value="item" />
</template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('page.system.systemLog.czxq')" prop="jcnr"> <el-form-item :label="$t('page.system.systemLog.czxq')" prop="jcnr">
<el-input v-model="searchForm.jcnr" :placeholder="$t('form.placeholderInput')" clearable <el-input v-model="searchForm.jcnr" :placeholder="$t('form.placeholderInput')" clearable
style="width: 200px" />
style="width: 120px" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search">{{ $t('page.business.study.study.search') }}</el-button> <el-button type="primary" icon="el-icon-search" @click="search">{{ $t('page.business.study.study.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button> <el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button>
<el-button type="warning" plain icon="el-icon-download" @click="handleExport" v-hasPermi="['business:systemLog:operate:export']">{{$t('form.export')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -61,7 +59,7 @@
</template> </template>
<script> <script>
import { systemLog_list } from "@/api/business/systemLog/systemLog"
import { systemLog_list,systemLog_czlxList } from "@/api/business/systemLog/systemLog"
export default { export default {
name: 'Czrz', name: 'Czrz',
props: { props: {
@ -71,6 +69,8 @@ export default {
data() { data() {
return { return {
daterange:[], daterange:[],
czlxList:[],
czlxListEn:[],
searchForm: { searchForm: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
@ -86,9 +86,16 @@ export default {
} }
}, },
created() { created() {
this.getCzlxList()
this.getList() this.getList()
}, },
methods: { methods: {
getCzlxList(){
systemLog_czlxList().then(response => {
this.czlxList = _.map(response.data,'jcmc')
this.czlxListEn = _.map(response.data,'jcmcEn')
})
},
search() { search() {
this.searchForm.pageNum = 1 this.searchForm.pageNum = 1
this.getList() this.getList()
@ -153,6 +160,12 @@ export default {
} catch (e) { } catch (e) {
return false; return false;
} }
},
handleExport(){
this.saveSimpleLog({name:'',nameEn:'',jcmc:'操作日志导出',jcmcEn:'User Action Log Export'})
this.searchForm.startDate = this.daterange && this.daterange.length > 0 ? this.daterange[0] : ''
this.searchForm.endDate = this.daterange && this.daterange.length > 1 ? this.daterange[1] : ''
this.download('system/business/systemLog/export', this.searchForm, `userActionLog_${new Date().getTime()}.xlsx`)
} }
} }
} }

+ 3
- 1
src/views/business/template/list.vue View File

@ -62,7 +62,7 @@
<el-table-column :label="$t('form.operate')" fixed="right" align="center" width="100"> <el-table-column :label="$t('form.operate')" fixed="right" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">{{ $t('page.system.template.bj') }}</el-button> <el-button type="text" @click="edit(scope.row)">{{ $t('page.system.template.bj') }}</el-button>
<el-button type="text" @click="bdpz(scope.row)">{{ $t('page.system.template.detail') }}</el-button>
<el-button type="text" @click="bdpz(scope.row)" v-hasPermi="['business:template:detail']">{{ $t('page.system.template.detail') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -264,6 +264,8 @@ export default {
}); });
}, },
bdpz(row) { bdpz(row) {
this.saveSimpleLog({name:row.name+'('+row.showSn+')',nameEn:row.name+'('+row.showSn+')',jcmc:'模板详情',jcmcEn:'Function Detail'})
this.tableDialog.title = '表单配置' this.tableDialog.title = '表单配置'
this.tableDialog.sn=row.sn this.tableDialog.sn=row.sn
this.tableDialog.visible=true this.tableDialog.visible=true

+ 4
- 1
src/views/system/dept/index.vue View File

@ -106,7 +106,7 @@
v-hasPermi="['system:dept:remove']" v-hasPermi="['system:dept:remove']"
>{{$t('page.system.dept.delete')}}</el-button> >{{$t('page.system.dept.delete')}}</el-button>
<el-button <el-button
v-hasPermi="['system:dept:detail']"
type="text" type="text"
@click="handleUpdate(scope.row,true)" @click="handleUpdate(scope.row,true)"
>{{$t('page.system.dept.detail')}}</el-button> >{{$t('page.system.dept.detail')}}</el-button>
@ -352,6 +352,9 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row,readonly) { handleUpdate(row,readonly) {
this.readonly = readonly this.readonly = readonly
if(readonly){
this.saveSimpleLog({name:row.deptName,nameEn:row.deptName,jcmc:'部门详情',jcmcEn:'Department Detail'})
}
this.reset() this.reset()
getDept(row.deptId).then(response => { getDept(row.deptId).then(response => {
this.form = response.data this.form = response.data

+ 66
- 56
src/views/system/dict/data.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="字典名称" prop="dictType">
<el-form-item :label="$t('page.system.dict.name')" prop="dictType">
<el-select v-model="queryParams.dictType"> <el-select v-model="queryParams.dictType">
<el-option <el-option
v-for="item in typeOptions" v-for="item in typeOptions"
@ -11,15 +11,15 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="字典标签" prop="dictLabel">
<el-form-item :label="$t('page.system.dict.bq')" prop="dictLabel">
<el-input <el-input
v-model="queryParams.dictLabel" v-model="queryParams.dictLabel"
placeholder="请输入字典标签"
:placeholder="$t('form.placeholderInput')"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status">
<!-- <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="数据状态" clearable> <el-select v-model="queryParams.status" placeholder="数据状态" clearable>
<el-option <el-option
v-for="dict in dict.type.sys_normal_disable" v-for="dict in dict.type.sys_normal_disable"
@ -28,10 +28,10 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item>
</el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('form.reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -43,10 +43,10 @@
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:dict:add']"
>新增</el-button>
v-hasPermi="['system:dict:add','system:dict:edit']"
>{{$t('form.add')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -77,7 +77,7 @@
@click="handleExport" @click="handleExport"
v-hasPermi="['system:dict:export']" v-hasPermi="['system:dict:export']"
>导出</el-button> >导出</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -85,49 +85,55 @@
icon="el-icon-close" icon="el-icon-close"
@click="handleClose" @click="handleClose"
>关闭</el-button>
>{{$t('form.close')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="dictCode" />
<el-table-column label="字典标签" align="center" prop="dictLabel">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<!-- <el-table-column label="字典编码" align="center" prop="dictCode" /> -->
<el-table-column :label="$t('page.system.dict.bq')" align="center" prop="dictLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span> <span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span>
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag> <el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="字典键值" align="center" prop="dictValue" />
<el-table-column label="字典排序" align="center" prop="dictSort" />
<el-table-column label="状态" align="center" prop="status">
<el-table-column :label="$t('page.system.dict.jz')" align="center" prop="dictValue" />
<el-table-column :label="$t('page.system.dict.sort')" align="center" prop="dictSort" />
<!-- <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template> </template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
</el-table-column> -->
<el-table-column :label="$t('form.remark')" align="center" prop="remark" :show-overflow-tooltip="true" />
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
</el-table-column> -->
<el-table-column :label="$t('form.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
@click="handleUpdate(scope.row,false)"
v-hasPermi="['system:dict:edit']" v-hasPermi="['system:dict:edit']"
>修改</el-button>
>{{$t('form.edit')}}</el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']" v-hasPermi="['system:dict:remove']"
>删除</el-button>
>{{$t('form.delete')}}</el-button>
<el-button
type="text"
@click="handleUpdate(scope.row,true)"
v-hasPermi="['system:dict:query']"
>{{$t('form.detail')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -142,23 +148,23 @@
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典类型">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="$t('page.system.dict.type')+':'">
<el-input v-model="form.dictType" :disabled="true" /> <el-input v-model="form.dictType" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item label="数据标签" prop="dictLabel">
<el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
<el-form-item :label="$t('page.system.dict.bq')+':'" prop="dictLabel">
<el-input v-model="form.dictLabel" :placeholder="$t('form.placeholderInput')" :readonly="readonly" />
</el-form-item> </el-form-item>
<el-form-item label="数据键值" prop="dictValue">
<el-input v-model="form.dictValue" placeholder="请输入数据键值" />
<el-form-item :label="$t('page.system.dict.jz')+':'" prop="dictValue">
<el-input v-model="form.dictValue" :placeholder="$t('form.placeholderInput')" :readonly="readonly" />
</el-form-item> </el-form-item>
<el-form-item label="样式属性" prop="cssClass">
<!-- <el-form-item label="样式属性" prop="cssClass">
<el-input v-model="form.cssClass" placeholder="请输入样式属性" /> <el-input v-model="form.cssClass" placeholder="请输入样式属性" />
</el-form-item> -->
<el-form-item :label="$t('page.system.dict.sort')+':'" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" :disabled="readonly" />
</el-form-item> </el-form-item>
<el-form-item label="显示排序" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="回显样式" prop="listClass">
<!-- <el-form-item label="回显样式" prop="listClass">
<el-select v-model="form.listClass"> <el-select v-model="form.listClass">
<el-option <el-option
v-for="item in listClassOptions" v-for="item in listClassOptions"
@ -176,14 +182,14 @@
:label="dict.value" :label="dict.value"
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item> -->
<el-form-item :label="$t('form.remark')+':'" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('form.placeholderInput')" :readonly="readonly"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<div slot="footer" class="dialog-footer" v-if="!readonly">
<el-button type="primary" @click="submitForm">{{$t('form.saveConfirm')}}</el-button>
<el-button @click="cancel">{{$t('form.cancel')}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -260,15 +266,17 @@ export default {
// //
rules: { rules: {
dictLabel: [ dictLabel: [
{ required: true, message: "数据标签不能为空", trigger: "blur" }
{ required: true, message: this.$t('form.placeholderInput'), trigger: "blur" }
], ],
dictValue: [ dictValue: [
{ required: true, message: "数据键值不能为空", trigger: "blur" }
{ required: true, message: this.$t('form.placeholderInput'), trigger: "blur" }
], ],
dictSort: [ dictSort: [
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
{ required: true, message: this.$t('form.placeholderInput'), trigger: "blur" }
] ]
}
},
readonly:false,
} }
}, },
created() { created() {
@ -337,9 +345,10 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.readonly = false
this.reset() this.reset()
this.open = true this.open = true
this.title = "添加字典数据"
this.title = this.$t('form.add')
this.form.dictType = this.queryParams.dictType this.form.dictType = this.queryParams.dictType
}, },
// //
@ -349,13 +358,17 @@ export default {
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) {
handleUpdate(row,readonly) {
this.readonly = readonly
if(readonly){
this.saveSimpleLog({name:row.dictLabel,nameEn:row.dictLabel,jcmc:'字典数据详情',jcmcEn:'Term Book Data Detail'})
}
this.reset() this.reset()
const dictCode = row.dictCode || this.ids const dictCode = row.dictCode || this.ids
getData(dictCode).then(response => { getData(dictCode).then(response => {
this.form = response.data this.form = response.data
this.open = true this.open = true
this.title = "修改字典数据"
this.title = readonly?this.$t('form.detail'):this.$t('form.edit')
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -365,14 +378,12 @@ export default {
if (this.form.dictCode != undefined) { if (this.form.dictCode != undefined) {
updateData(this.form).then(response => { updateData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType) this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
this.$modal.msgSuccess("修改成功")
this.open = false this.open = false
this.getList() this.getList()
}) })
} else { } else {
addData(this.form).then(response => { addData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType) this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
this.$modal.msgSuccess("新增成功")
this.open = false this.open = false
this.getList() this.getList()
}) })
@ -383,11 +394,10 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const dictCodes = row.dictCode || this.ids const dictCodes = row.dictCode || this.ids
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('form.confirmDelete')).then(function() {
return delData(dictCodes) return delData(dictCodes)
}).then(() => { }).then(() => {
this.getList() this.getList()
this.$modal.msgSuccess("删除成功")
this.$store.dispatch('dict/removeDict', this.queryParams.dictType) this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
}).catch(() => {}) }).catch(() => {})
}, },

+ 67
- 57
src/views/system/dict/index.vue View File

@ -1,28 +1,28 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="字典名称" prop="dictName">
<el-form-item :label="$t('page.system.dict.name')" prop="dictName">
<el-input <el-input
v-model="queryParams.dictName" v-model="queryParams.dictName"
placeholder="请输入字典名称"
:placeholder="$t('form.placeholderInput')"
clearable clearable
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-form-item :label="$t('page.system.dict.type')" prop="dictType">
<el-input <el-input
v-model="queryParams.dictType" v-model="queryParams.dictType"
placeholder="请输入字典类型"
:placeholder="$t('form.placeholderInput')"
clearable clearable
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status">
<!-- <el-form-item label="状态" prop="status">
<el-select <el-select
v-model="queryParams.status" v-model="queryParams.status"
placeholder="字典状态"
placeholder="请选择"
clearable clearable
style="width: 240px" style="width: 240px"
> >
@ -33,8 +33,8 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item>
<el-form-item label="创建时间">
</el-form-item> -->
<!-- <el-form-item label="创建时间">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
style="width: 240px" style="width: 240px"
@ -44,10 +44,10 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item>
</el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('form.reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -60,9 +60,9 @@
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:dict:add']" v-hasPermi="['system:dict:add']"
>新增</el-button>
>{{$t('form.add')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -93,7 +93,7 @@
@click="handleExport" @click="handleExport"
v-hasPermi="['system:dict:export']" v-hasPermi="['system:dict:export']"
>导出</el-button> >导出</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
@ -101,50 +101,55 @@
icon="el-icon-refresh" icon="el-icon-refresh"
@click="handleRefreshCache" @click="handleRefreshCache"
v-hasPermi="['system:dict:remove']"
>刷新缓存</el-button>
v-hasPermi="['system:dict:refresh']"
>{{$t('page.system.dict.refresh')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row> </el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编号" align="center" prop="dictId" />
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<!-- <el-table-column label="字典编号" align="center" prop="dictId" /> -->
<el-table-column :label="$t('page.system.dict.name')" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column :label="$t('page.system.dict.type')" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
<router-link v-if="checkPermi(['system:dict:query','system:dict:edit'])" :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
<span>{{ scope.row.dictType }}</span> <span>{{ scope.row.dictType }}</span>
</router-link> </router-link>
<span v-else>{{scope.row.dictType}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="status">
<!-- <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template> </template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
</el-table-column> -->
<el-table-column :label="$t('form.remark')" align="center" prop="remark" :show-overflow-tooltip="true" />
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
</el-table-column> -->
<el-table-column :label="$t('form.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
@click="handleUpdate(scope.row,false)"
v-hasPermi="['system:dict:edit']" v-hasPermi="['system:dict:edit']"
>修改</el-button>
>{{$t('form.edit')}}</el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']" v-hasPermi="['system:dict:remove']"
>删除</el-button>
>{{$t('form.delete')}}</el-button>
<el-button
type="text"
@click="handleUpdate(scope.row,true)"
v-hasPermi="['system:dict:query']"
>{{$t('form.detail')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -159,29 +164,29 @@
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入字典名称" />
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="$t('page.system.dict.name')+':'" prop="dictName">
<el-input v-model="form.dictName" :placeholder="$t('form.placeholderInput')" :readonly="readonly" />
</el-form-item> </el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input v-model="form.dictType" placeholder="请输入字典类型" />
<el-form-item :label="$t('page.system.dict.type')+':'" prop="dictType">
<el-input v-model="form.dictType" :placeholder="$t('form.placeholderInput')" :readonly="readonly" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<!-- <el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status" :disabled="readonly">
<el-radio <el-radio
v-for="dict in dict.type.sys_normal_disable" v-for="dict in dict.type.sys_normal_disable"
:key="dict.value" :key="dict.value"
:label="dict.value" :label="dict.value"
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item> -->
<el-form-item :label="$t('form.remark')+':'" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('form.placeholderInput')" :readonly="readonly"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<div slot="footer" class="dialog-footer" v-if="!readonly">
<el-button type="primary" @click="submitForm">{{$t('form.saveConfirm')}}</el-button>
<el-button @click="cancel">{{$t('form.cancel')}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -189,6 +194,7 @@
<script> <script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type" import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"
import { checkPermi } from "@/utils/permission";
export default { export default {
name: "Dict", name: "Dict",
@ -228,18 +234,21 @@ export default {
// //
rules: { rules: {
dictName: [ dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" }
{ required: true, message: this.$t('form.placeholderInput'), trigger: "blur" }
], ],
dictType: [ dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
{ required: true, message: this.$t('form.placeholderInput'), trigger: "blur" }
] ]
}
},
readonly:false,
} }
}, },
created() { created() {
this.getList() this.getList()
}, },
methods: { methods: {
checkPermi,
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getList() { getList() {
this.loading = true this.loading = true
@ -279,9 +288,10 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.readonly = false
this.reset() this.reset()
this.open = true this.open = true
this.title = "添加字典类型"
this.title = this.$t('form.add')
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -290,13 +300,17 @@ export default {
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) {
handleUpdate(row,readonly) {
this.readonly = readonly
if(readonly){
this.saveSimpleLog({name:row.dictName,nameEn:row.dictName,jcmc:'字典详情',jcmcEn:'Term Book Detail'})
}
this.reset() this.reset()
const dictId = row.dictId || this.ids const dictId = row.dictId || this.ids
getType(dictId).then(response => { getType(dictId).then(response => {
this.form = response.data this.form = response.data
this.open = true this.open = true
this.title = "修改字典类型"
this.title = readonly?this.$t('form.detail'):this.$t('form.edit')
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -305,13 +319,11 @@ export default {
if (valid) { if (valid) {
if (this.form.dictId != undefined) { if (this.form.dictId != undefined) {
updateType(this.form).then(response => { updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false this.open = false
this.getList() this.getList()
}) })
} else { } else {
addType(this.form).then(response => { addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false this.open = false
this.getList() this.getList()
}) })
@ -322,11 +334,10 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const dictIds = row.dictId || this.ids const dictIds = row.dictId || this.ids
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('form.confirmDelete')).then(function() {
return delType(dictIds) return delType(dictIds)
}).then(() => { }).then(() => {
this.getList() this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {}) }).catch(() => {})
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
@ -338,7 +349,6 @@ export default {
/** 刷新缓存按钮操作 */ /** 刷新缓存按钮操作 */
handleRefreshCache() { handleRefreshCache() {
refreshCache().then(() => { refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功")
this.$store.dispatch('dict/cleanDict') this.$store.dispatch('dict/cleanDict')
}) })
} }

+ 15
- 13
src/views/system/role/index.vue View File

@ -58,6 +58,16 @@
v-hasPermi="['system:role:add']" v-hasPermi="['system:role:add']"
>{{$t('form.add')}}</el-button> >{{$t('form.add')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
@click="handleExport"
v-hasPermi="['system:role:export']"
>{{$t('form.export')}}</el-button>
</el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -80,16 +90,7 @@
v-hasPermi="['system:role:remove']" v-hasPermi="['system:role:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
@click="handleExport"
v-hasPermi="['system:role:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> --> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row> </el-row>
@ -134,7 +135,7 @@
type="text" type="text"
@click="handleStatusChange(scope.row)" @click="handleStatusChange(scope.row)"
v-hasPermi="['system:role:edit']"
v-hasPermi="['system:role:enable']"
v-if="scope.row.status==='0'" v-if="scope.row.status==='0'"
>{{$t('page.system.role.disable')}}</el-button> >{{$t('page.system.role.disable')}}</el-button>
@ -142,7 +143,7 @@
type="text" type="text"
@click="handleStatusChange(scope.row)" @click="handleStatusChange(scope.row)"
v-hasPermi="['system:role:edit']"
v-hasPermi="['system:role:enable']"
v-if="scope.row.status==='1'" v-if="scope.row.status==='1'"
>{{$t('page.system.role.enable')}}</el-button> >{{$t('page.system.role.enable')}}</el-button>
@ -154,7 +155,7 @@
>{{$t('page.system.role.allocate')}}</el-button> >{{$t('page.system.role.allocate')}}</el-button>
<el-button <el-button
v-hasPermi="['system:role:detail']"
type="text" type="text"
@click="handleUpdate(scope.row,true)" @click="handleUpdate(scope.row,true)"
>{{$t('page.system.role.detail')}}</el-button> >{{$t('page.system.role.detail')}}</el-button>
@ -694,6 +695,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.saveSimpleLog({name:'',nameEn:'',jcmc:'角色导出',jcmcEn:'Role Export'})
this.download('system/role/export', { this.download('system/role/export', {
...this.queryParams ...this.queryParams
}, `role_${new Date().getTime()}.xlsx`) }, `role_${new Date().getTime()}.xlsx`)

+ 10
- 3
src/views/system/user/index.vue View File

@ -264,12 +264,14 @@
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="$t('page.system.user.history')" :visible.sync="changeDialog.visible" width="70%" append-to-body> <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="$t('page.system.user.history')" :visible.sync="changeDialog.visible" width="70%" append-to-body>
<el-button type="warning" plain icon="el-icon-download" @click="handleExportHistory" v-hasPermi="['system:user:roleChange:export']" style="margin-bottom:10px">{{$t('form.export')}}</el-button>
<el-table v-loading="changeDialog.loading" :data="changeDialog.list"> <el-table v-loading="changeDialog.loading" :data="changeDialog.list">
<el-table-column :label="$t('form.signer')" prop="qmrMc" width="150" /> <el-table-column :label="$t('form.signer')" prop="qmrMc" width="150" />
<el-table-column :label="$t('form.qmyy')" :prop="$i18n.locale === 'zh_CN'?'jcmc':'jcmcEn'" width="150" />
<el-table-column :label="$t('form.qmyy')" :prop="$i18n.locale === 'zh_CN'?'jcmc':'jcmcEn'" width="180" />
<el-table-column :label="$t('form.signTime')" prop="createTime" width="150" /> <el-table-column :label="$t('form.signTime')" prop="createTime" width="150" />
<el-table-column :label="$t('page.system.user.bgqjs')" prop="bgq" /> <el-table-column :label="$t('page.system.user.bgqjs')" prop="bgq" />
<el-table-column :label="$t('page.system.user.bgqjs')" prop="bgh" />
<el-table-column :label="$t('page.system.user.bghjs')" prop="bgh" />
</el-table> </el-table>
<pagination <pagination
v-show="changeDialog.total>0" v-show="changeDialog.total>0"
@ -283,7 +285,7 @@
</template> </template>
<script> <script>
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect,roleChangeList,roleChangeExport } from "@/api/system/user"
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect,roleChangeList } from "@/api/system/user"
import { getToken } from "@/utils/auth" import { getToken } from "@/utils/auth"
import Treeselect from "@riophae/vue-treeselect" import Treeselect from "@riophae/vue-treeselect"
import "@riophae/vue-treeselect/dist/vue-treeselect.css" import "@riophae/vue-treeselect/dist/vue-treeselect.css"
@ -657,6 +659,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.saveSimpleLog({name:'',nameEn:'',jcmc:'用户导出',jcmcEn:'User Export'})
this.download('system/user/export', { this.download('system/user/export', {
...this.queryParams ...this.queryParams
}, `user_${new Date().getTime()}.xlsx`) }, `user_${new Date().getTime()}.xlsx`)
@ -716,6 +719,10 @@ export default {
}).finally(()=>{ }).finally(()=>{
this.changeDialog.loading = false; this.changeDialog.loading = false;
}) })
},
handleExportHistory(){
this.saveSimpleLog({name:'',nameEn:'',jcmc:'角色变更历史导出',jcmcEn:'Role History Export'})
this.download('/system/business/roleChange/export', this.changeDialog.searchForm, `roleHistory_${new Date().getTime()}.xlsx`)
} }
} }
} }

Loading…
Cancel
Save