参数试剂维护
This commit is contained in:
parent
dbf6cfcd8b
commit
3af945b0f3
@ -99,3 +99,11 @@ export function delXmLot(data?: Object) {
|
|||||||
params: data
|
params: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 获取试剂厂家
|
||||||
|
export function querySjcs(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/xminfo/querySjcs',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -60,10 +60,13 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
dictType: '',
|
dictType: '',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
objKey: 'label'
|
objKey: 'value',
|
||||||
|
fields: () => [
|
||||||
|
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||||
|
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const emits = defineEmits<Emits>();
|
const emits = defineEmits<Emits>();
|
||||||
const searchKey = ref('');
|
const searchKey = ref('');
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
:header-cell-class-name="enableColumnDrag ? 'el-table-header-cell' : ''" @row-dblclick="handleRowDblclick"
|
:header-cell-class-name="enableColumnDrag ? 'el-table-header-cell' : ''" @row-dblclick="handleRowDblclick"
|
||||||
@sort-change="handleSortChange" v-bind="$attrs">
|
@sort-change="handleSortChange" v-bind="$attrs">
|
||||||
|
|
||||||
|
|
||||||
<!-- 动态列 -->
|
<!-- 动态列 -->
|
||||||
<template v-for="item in columns" :key="item.prop">
|
<template v-for="item in columns" :key="item.prop">
|
||||||
<!-- 多选列 -->
|
<!-- 多选列 -->
|
||||||
@ -340,6 +339,10 @@ const setScrollTo = (top: number) => {
|
|||||||
tableRef.value?.scrollTo(top);
|
tableRef.value?.scrollTo(top);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const setScrollTop = (height: number) => {
|
||||||
|
tableRef.value?.setScrollTop(height);
|
||||||
|
};
|
||||||
|
|
||||||
const clearSort = () => {
|
const clearSort = () => {
|
||||||
tableRef.value?.clearSort();
|
tableRef.value?.clearSort();
|
||||||
};
|
};
|
||||||
@ -359,6 +362,7 @@ defineExpose({
|
|||||||
toggleAllSelection,
|
toggleAllSelection,
|
||||||
setCurrentRow,
|
setCurrentRow,
|
||||||
setScrollTo,
|
setScrollTo,
|
||||||
|
setScrollTop,
|
||||||
clearSort,
|
clearSort,
|
||||||
doLayout,
|
doLayout,
|
||||||
sort,
|
sort,
|
||||||
|
|||||||
@ -73,7 +73,7 @@ import DictTag from '@/components/DictTag'
|
|||||||
// elTable表格组件
|
// elTable表格组件
|
||||||
import CustomTable from '@/components/elTable'
|
import CustomTable from '@/components/elTable'
|
||||||
// vxeTable 组件
|
// vxeTable 组件
|
||||||
import VxeTable from '@/components/vxeTable'
|
import CustomVxeTable from '@/components/vxeTable'
|
||||||
// 下拉框表格组件
|
// 下拉框表格组件
|
||||||
import SelectTable from '@/components/SelectTable'
|
import SelectTable from '@/components/SelectTable'
|
||||||
import print from 'vue3-print-nb';
|
import print from 'vue3-print-nb';
|
||||||
@ -101,7 +101,7 @@ app.component('ImagePreview', ImagePreview)
|
|||||||
app.component('RightToolbar', RightToolbar)
|
app.component('RightToolbar', RightToolbar)
|
||||||
app.component('Editor', Editor)
|
app.component('Editor', Editor)
|
||||||
app.component('CustomTable', CustomTable)
|
app.component('CustomTable', CustomTable)
|
||||||
app.component('VxeTable', VxeTable)
|
app.component('CustomVxeTable ', CustomVxeTable)
|
||||||
app.component('SelectTable', SelectTable)
|
app.component('SelectTable', SelectTable)
|
||||||
|
|
||||||
//VUE3标准方法注入全局方法
|
//VUE3标准方法注入全局方法
|
||||||
|
|||||||
2
src/types/SelectTable.d.ts
vendored
2
src/types/SelectTable.d.ts
vendored
@ -5,7 +5,7 @@ export interface Emits {
|
|||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
data: any;
|
data: any;
|
||||||
fields: Field[];
|
fields?: Field[];
|
||||||
tableData?: object[];
|
tableData?: object[];
|
||||||
label?: string;
|
label?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
:columns="columns"></right-toolbar> -->
|
:columns="columns"></right-toolbar> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<VxeTable :table-data="tableData" :loading="loading" :columns="columns"
|
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns"
|
||||||
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="rowHandle" size="small"
|
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="rowHandle" size="small"
|
||||||
:row-style="rowClassNameHd" :cell-style="cellStyleHd" class="mytable-style" ref="tableRef"
|
:row-style="rowClassNameHd" :cell-style="cellStyleHd" class="mytable-style" ref="tableRef"
|
||||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" @selection-change="selectionChange"
|
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" @selection-change="selectionChange"
|
||||||
@ -94,7 +94,7 @@
|
|||||||
<template #yljg="{ row }">
|
<template #yljg="{ row }">
|
||||||
{{ formatDict(row.yljg, 'HOS') }}
|
{{ formatDict(row.yljg, 'HOS') }}
|
||||||
</template>
|
</template>
|
||||||
</VxeTable>
|
</CustomVxeTable>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" class="right-table">
|
<el-col :span="8" class="right-table">
|
||||||
@ -161,7 +161,7 @@ import { ref, reactive, toRaw, computed, watch, nextTick, onMounted, } from 'vue
|
|||||||
import { HiprintPrinter } from '@/utils/hiprintPrinter';
|
import { HiprintPrinter } from '@/utils/hiprintPrinter';
|
||||||
import { classCom } from '@/utils/classCom';
|
import { classCom } from '@/utils/classCom';
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import VxeTable from '@/components/vxeTable/index.vue'
|
import CustomVxeTable from '@/components/vxeTable/index.vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { usePrintStore } from '@/store/modules/printStore'
|
import { usePrintStore } from '@/store/modules/printStore'
|
||||||
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain } from '@/api/checkCode/index'
|
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain } from '@/api/checkCode/index'
|
||||||
|
|||||||
@ -91,7 +91,7 @@
|
|||||||
<!-- <CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
|
<!-- <CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
|
||||||
@selection-change="selectionChange" @row-click="rowHandle" :enableColumnDrag="true"
|
@selection-change="selectionChange" @row-click="rowHandle" :enableColumnDrag="true"
|
||||||
@column-drag-end="handleColumnDragEnd"> -->
|
@column-drag-end="handleColumnDragEnd"> -->
|
||||||
<VxeTable :table-data="tableData" :loading="loading" :columns="columns"
|
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns"
|
||||||
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="rowHandle" size="small"
|
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="rowHandle" size="small"
|
||||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" class="mytable-style" ref="tableRefs"
|
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" class="mytable-style" ref="tableRefs"
|
||||||
:cell-style="cellStyleHd" @selection-change="selectionChange" :config="tableConfig" :enable-column-drag="true"
|
:cell-style="cellStyleHd" @selection-change="selectionChange" :config="tableConfig" :enable-column-drag="true"
|
||||||
@ -105,7 +105,7 @@
|
|||||||
<template #jzbz="{ row }">
|
<template #jzbz="{ row }">
|
||||||
{{ row.jzbz == 1 ? '急' : '' }}
|
{{ row.jzbz == 1 ? '急' : '' }}
|
||||||
</template>
|
</template>
|
||||||
</VxeTable>
|
</CustomVxeTable>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" class="right-table">
|
<el-col :span="8" class="right-table">
|
||||||
@ -173,7 +173,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, toRaw, computed, watch, nextTick, onMounted } from 'vue';
|
import { ref, reactive, toRaw, computed, watch, nextTick, onMounted } from 'vue';
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import VxeTable from '@/components/vxeTable/index.vue'
|
import CustomVxeTable from '@/components/vxeTable/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { reportList, reportPrintPdf, reportResult, reportMedList, reportFsresult } from '@/api/checkCode/index'
|
import { reportList, reportPrintPdf, reportResult, reportMedList, reportFsresult } from '@/api/checkCode/index'
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="height: 60vh;">
|
<div style="height: 60vh;">
|
||||||
<VxeTable ref="tableRef" :loading="loading" :data="tableData" :columns="columns" :enable-column-drag="true"
|
<CustomVxeTable ref="tableRef" :loading="loading" :data="tableData" :columns="columns" :enable-column-drag="true"
|
||||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" @column-drag-end="handleColumnDragEnd"
|
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" @column-drag-end="handleColumnDragEnd"
|
||||||
:config="tableConfig" @current-change="rowClick" class="mytable-style" @selection-change="selecChange">
|
:config="tableConfig" @current-change="rowClick" class="mytable-style" @selection-change="selecChange">
|
||||||
<template #xmgl="{ row }">
|
<template #xmgl="{ row }">
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<template #yqdl="{ row }">
|
<template #yqdl="{ row }">
|
||||||
{{ formatDict(row.yqdl, 'YQDL') }}
|
{{ formatDict(row.yqdl, 'YQDL') }}
|
||||||
</template>
|
</template>
|
||||||
</VxeTable>
|
</CustomVxeTable>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { formatDict, getDictData, dictData } from '@/hooks';
|
import { formatDict, getDictData, dictData } from '@/hooks';
|
||||||
import SelectTable from '@/components/SelectTable/index.vue'
|
import SelectTable from '@/components/SelectTable/index.vue'
|
||||||
import VxeTable from '@/components/vxeTable/index.vue'
|
import CustomVxeTable from '@/components/vxeTable/index.vue'
|
||||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
|
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
|
||||||
import { queryBatchList, addBatch, delBatch } from '@/api/liswork/labItem/labItemApi'
|
import { queryBatchList, addBatch, delBatch } from '@/api/liswork/labItem/labItemApi'
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-input v-model="searchKey" ref="searchInput" size="small" placeholder="快速搜索(支持简拼)" class="mb5" clearable
|
<el-input v-model="searchKey" ref="searchInput" size="small" placeholder="快速搜索(支持简拼)" class="mb5" clearable
|
||||||
@clear="filterDataHandle" @input="filterDataHandle" />
|
@clear="filterDataHandle" @input="filterDataHandle" />
|
||||||
<VxeTable ref="tableRefs" :data="filterData" :columns="columns" class="mytable-style"
|
<CustomVxeTable ref="tableRefs" :data="filterData" :columns="columns" class="mytable-style"
|
||||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '350', }" @current-change="rowHandle"
|
:scrollYConfig="{ enabled: true, rSize: 30, height: '350', }" @current-change="rowHandle"
|
||||||
:enableColumnDrag="true" @column-drag-end="handleColumnDragEnd" />
|
:enableColumnDrag="true" @column-drag-end="handleColumnDragEnd" />
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import VxeTable from '@/components/vxeTable/index.vue'
|
import CustomVxeTable from '@/components/vxeTable/index.vue'
|
||||||
import { queryXmInfoNew } from '@/api/liswork/labItem/labItemApi'
|
import { queryXmInfoNew } from '@/api/liswork/labItem/labItemApi'
|
||||||
import { getFirstLetter } from '@/utils/pinyin';
|
import { getFirstLetter } from '@/utils/pinyin';
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-input v-model="searchKey" ref="searchInput" size="small" placeholder="快速搜索(支持简拼)" class="mb5" clearable
|
<el-input v-model="searchKey" ref="searchInput" size="small" placeholder="快速搜索(支持简拼)" class="mb5" clearable
|
||||||
@clear="filterDataHandle" @input="filterDataHandle" />
|
@clear="filterDataHandle" @input="filterDataHandle" />
|
||||||
<VxeTable ref="tableRefs" :data="filterData" :columns="columnsDown" class="mytable-style"
|
<CustomVxeTable ref="tableRefs" :data="filterData" :columns="columnsDown" class="mytable-style"
|
||||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '380', }" @current-change="rowHandleDown"
|
:scrollYConfig="{ enabled: true, rSize: 30, height: '380', }" @current-change="rowHandleDown"
|
||||||
:enableColumnDrag="true" @column-drag-end="handleColumnDragEnd" />
|
:enableColumnDrag="true" @column-drag-end="handleColumnDragEnd" />
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import VxeTable from '@/components/vxeTable/index.vue'
|
import CustomVxeTable from '@/components/vxeTable/index.vue'
|
||||||
import { queryXmInfoNew, queryXmAlarmdetailNew, addXmAlarmdetailNew, delXmAlarmdetailNew } from '@/api/liswork/labItem/labItemApi'
|
import { queryXmInfoNew, queryXmAlarmdetailNew, addXmAlarmdetailNew, delXmAlarmdetailNew } from '@/api/liswork/labItem/labItemApi'
|
||||||
import { XmAlarmdetailNew } from '@/types'
|
import { XmAlarmdetailNew } from '@/types'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
|
|||||||
@ -57,7 +57,7 @@ const allClear = () => {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.table-container {
|
.table-container {
|
||||||
height: 100%;
|
height: calc(100% - 58px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-toolbar {
|
.table-toolbar {
|
||||||
|
|||||||
@ -204,12 +204,12 @@ watch(yq, (newVal) => {
|
|||||||
if (newVal !== undefined) {
|
if (newVal !== undefined) {
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
}, { immediate: true })
|
}, { deep: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.sys_box {
|
.sys_box {
|
||||||
height: 100%;
|
height: calc(100% - 58px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-toolbar {
|
.table-toolbar {
|
||||||
|
|||||||
@ -204,12 +204,12 @@ watch(yq, (newVal) => {
|
|||||||
if (newVal !== undefined) {
|
if (newVal !== undefined) {
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
}, { immediate: true })
|
}, { deep: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.sys_box {
|
.sys_box {
|
||||||
height: 100%;
|
height: calc(100% - 58px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-toolbar {
|
.table-toolbar {
|
||||||
|
|||||||
@ -140,7 +140,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="默认模板" prop="mrmb">
|
<el-form-item label="默认模板" prop="mrmb">
|
||||||
<el-select v-model="formData.mrmb" style="width: 12rem;">
|
<el-select v-model="formData.mrmb" style="width: 12rem;">
|
||||||
<el-option v-for="item in sjtableData" :key="item.sjph" :value="item.sjph" :label="item.sjph" />
|
<!-- <el-option v-for="item in sjtableData" :key="item.sjph" :value="item.sjph" :label="item.sjph" /> -->
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -195,22 +195,20 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="厂商" prop="sjcs">
|
<el-table-column label="厂商" prop="sjcs">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select v-model="scope.row.sjcs" class="full-width-input">
|
<el-select v-model="scope.row.sjcs" class="full-width-input" filterable allow-create>
|
||||||
<el-option label="请选择" value="" />
|
<el-option v-for="item in cjList" :label="item.na" :value="item.no" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="有效期" prop="yxq">
|
<el-table-column label="有效期" prop="yxq">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-date-picker v-model="scope.row.yxq" type="datetime" placeholder="0000:00:00 00:00"
|
<el-date-picker v-model="scope.row.yxq" type="datetime" placeholder="0000:00:00 00:00:00"
|
||||||
format="YYYY-MM-DD HH:mm" value-format="YYYY-MM-DD HH:mm" style="width:100%" />
|
format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" style="width:100%" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="方法" prop="csff">
|
<el-table-column label="方法" prop="csff">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select v-model="scope.row.csff" class="full-width-input">
|
<SelectTable v-model:data="scope.row.csff" :tableData="dictData.MD" class="full-width-input" />
|
||||||
<el-option label="请选择" value="" />
|
|
||||||
</el-select>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -219,9 +217,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { queryFilter, addXmFilter, delXmFilter, addXmLot, delXmLot, queryXmLot } from '@/api/liswork/xtwh/ComOpt'
|
import { queryFilter, addXmFilter, delXmFilter, addXmLot, delXmLot, queryXmLot, querySjcs } from '@/api/liswork/xtwh/ComOpt'
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
import { formatDict, dictData } from '@/hooks'
|
||||||
|
import { get } from 'lodash';
|
||||||
|
|
||||||
const yq = defineModel<string>()
|
const yq = defineModel<string>()
|
||||||
|
|
||||||
@ -256,7 +255,6 @@ const rules = ref({
|
|||||||
|
|
||||||
const form = ref();
|
const form = ref();
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
console.log('保存')
|
|
||||||
form.value.validate((valid: boolean) => {
|
form.value.validate((valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log('submit!')
|
console.log('submit!')
|
||||||
@ -314,8 +312,9 @@ interface sjList {
|
|||||||
const sjShow = ref(false)
|
const sjShow = ref(false)
|
||||||
const sjtableData = ref<sjList[]>([])
|
const sjtableData = ref<sjList[]>([])
|
||||||
const sjHandle = () => {
|
const sjHandle = () => {
|
||||||
sjShow.value = true
|
|
||||||
getSjList()
|
getSjList()
|
||||||
|
getSjcjList()
|
||||||
|
sjShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const sjRowClick = (row: any) => {
|
const sjRowClick = (row: any) => {
|
||||||
@ -323,30 +322,54 @@ const sjRowClick = (row: any) => {
|
|||||||
}
|
}
|
||||||
const getSjList = () => {
|
const getSjList = () => {
|
||||||
selectRow.value = null
|
selectRow.value = null
|
||||||
queryXmLot().then((res: any) => {
|
queryXmLot({ yq: yq.value }).then((res: any) => {
|
||||||
sjtableData.value = res.data
|
sjtableData.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const sjsavaItem = () => {
|
const sjsavaItem = () => {
|
||||||
|
sjtableData.value.forEach(item => {
|
||||||
|
item.yq = yq.value || ''
|
||||||
|
})
|
||||||
|
addXmLot(sjtableData.value).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('保存成功!')
|
||||||
|
getSjList()
|
||||||
|
getSjcjList()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const sjaddItem = () => {
|
const sjaddItem = () => {
|
||||||
sjtableData.value.push({
|
sjtableData.value.push({
|
||||||
sjcs: '',
|
sjcs: '',
|
||||||
sjph: '',
|
sjph: '',
|
||||||
yq: '',
|
|
||||||
yxq: '',
|
yxq: '',
|
||||||
csff: ''
|
csff: '',
|
||||||
|
yq: yq.value || '',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const sjdelItem = () => {
|
const sjdelItem = () => {
|
||||||
|
if (!selectRow.value) return ElMessage.warning('请选择要删除的行!')
|
||||||
|
if (selectRow.value.sjph) {
|
||||||
|
delXmLot(selectRow.value)
|
||||||
|
}
|
||||||
|
sjtableData.value = sjtableData.value.filter(item => item.sjph != selectRow.value.sjph)
|
||||||
|
selectRow.value = null
|
||||||
}
|
}
|
||||||
|
const cjList = ref<Array<{ no: string, na: string }>>([])
|
||||||
|
const getSjcjList = () => {
|
||||||
|
querySjcs({ yq: yq.value }).then((res: any) => {
|
||||||
|
cjList.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
watch(yq, (newVal) => {
|
watch(yq, (newVal) => {
|
||||||
getDzList()
|
getDzList()
|
||||||
}, { immediate: true })
|
getSjList()
|
||||||
|
}, { deep: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -1,30 +1,55 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 整体排序 -->
|
<!-- 整体排序 -->
|
||||||
<div class="sort_box">
|
<div class="sort_box">
|
||||||
<el-row :gutter="10" class="table-toolbar">
|
<el-row :gutter="10" class="table-row">
|
||||||
<el-col :span="1.5">
|
<el-col :span="20" class="table-box">
|
||||||
<el-button type="primary" @click="">首位</el-button>
|
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true"
|
||||||
|
@row-click="handleRowClick" @column-drag-end="handleColumnDragEnd" :config="tableConfig">
|
||||||
|
<template #xmgl="{ row }">
|
||||||
|
{{ formatDict(row.xmgl, 'XMGL') }}
|
||||||
|
</template>
|
||||||
|
<template #dyxh="{ row }">
|
||||||
|
<el-input v-model="row.dyxh" class="full-width-input" />
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="4">
|
||||||
<el-button type="primary" icon="top" @click="">上移</el-button>
|
<el-row :gutter="10" class="table-toolbar">
|
||||||
</el-col>
|
<el-col :span="1.5">
|
||||||
<el-col :span="1.5">
|
<el-radio-group v-model="radio" @change="radioChange">
|
||||||
<el-button type="primary" icon="bottom" @click="">下移</el-button>
|
<el-radio value="1">上下移动调整</el-radio>
|
||||||
</el-col>
|
<el-radio value="2">手工输入工号</el-radio>
|
||||||
<el-col :span="1.5">
|
</el-radio-group>
|
||||||
<el-button type="primary" @click="">末位</el-button>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" @click="refresh">刷新</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" @click="cpHandle">存盘</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" :disabled="radio == '2'" @click="firstHandle">首位</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" icon="top" :disabled="radio == '2'" @click="prevHandle">上移</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" icon="bottom" :disabled="radio == '2'" @click="nextHandle">下移</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" :disabled="radio == '2'" @click="lastHadnle">末位</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table-row">
|
|
||||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true"
|
|
||||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { formatDict, dictData } from '@/hooks';
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dataList: {
|
dataList: {
|
||||||
@ -33,15 +58,24 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interface DataItem {
|
||||||
const tableRef = ref<any>(null);
|
xmgl: string | number;
|
||||||
const dataList = ref([]);
|
xmid: string | number;
|
||||||
|
xmdh: string | number;
|
||||||
|
xmmc: string | number;
|
||||||
|
dyxh: string | number;
|
||||||
|
fzdyxh: string | number;
|
||||||
|
}
|
||||||
|
const currentIndex = ref(0);
|
||||||
|
const radio = ref('1');
|
||||||
|
const tableRef = ref();
|
||||||
|
const dataList = ref<DataItem[]>([]);
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ prop: 'xmgl', label: '项目类别', visible: true, align: 'center', },
|
{ prop: 'xmgl', label: '项目类别', visible: true, align: 'center', slot: "xmgl" },
|
||||||
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center', },
|
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center', },
|
||||||
{ prop: 'xmdh', label: '英文缩写', visible: true, align: 'center', },
|
{ prop: 'xmdh', label: '英文缩写', visible: true, align: 'center', },
|
||||||
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center', },
|
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center', },
|
||||||
{ prop: 'dyxh', label: '整体排序', visible: true, align: 'center', },
|
{ prop: 'dyxh', label: '整体排序', visible: false, align: 'center', slot: "dyxh" },
|
||||||
{ prop: 'fzdyxh', label: '分组打印序号', visible: true, align: 'center', },
|
{ prop: 'fzdyxh', label: '分组打印序号', visible: true, align: 'center', },
|
||||||
]);
|
]);
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
@ -56,28 +90,81 @@ const handleColumnDragEnd = (data: any) => {
|
|||||||
// 更新列配置
|
// 更新列配置
|
||||||
columns.value = data.columns;
|
columns.value = data.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleRowClick = (row: DataItem) => {
|
||||||
|
currentIndex.value = dataList.value.indexOf(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
const radioChange = (val: string) => {
|
||||||
|
if (val == '1') {
|
||||||
|
columns.value[4].visible = false
|
||||||
|
} else {
|
||||||
|
columns.value[4].visible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const refresh = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const cpHandle = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
const firstHandle = () => {
|
||||||
|
currentIndex.value = 0;
|
||||||
|
tableRef.value.setCurrentRow(dataList.value[0]);
|
||||||
|
tableRef.value.setScrollTop(0)
|
||||||
|
}
|
||||||
|
const prevHandle = () => {
|
||||||
|
if (currentIndex.value == 0) return;
|
||||||
|
currentIndex.value--;
|
||||||
|
tableRef.value.setCurrentRow(dataList.value[currentIndex.value]);
|
||||||
|
tableRef.value.setScrollTop(currentIndex.value * 30)
|
||||||
|
}
|
||||||
|
const nextHandle = () => {
|
||||||
|
if (currentIndex.value == dataList.value.length - 1) return;
|
||||||
|
currentIndex.value++;
|
||||||
|
tableRef.value.setCurrentRow(dataList.value[currentIndex.value]);
|
||||||
|
tableRef.value.setScrollTop(currentIndex.value * 30)
|
||||||
|
}
|
||||||
|
const lastHadnle = () => {
|
||||||
|
currentIndex.value = dataList.value.length - 1;
|
||||||
|
tableRef.value.setCurrentRow(dataList.value[dataList.value.length - 1]);
|
||||||
|
tableRef.value.setScrollTop(dataList.value.length * 30)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.sort_box {
|
.sort_box {
|
||||||
height: 100%;
|
height: calc(100% - 58px);
|
||||||
|
padding-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-toolbar {
|
.table-toolbar {
|
||||||
margin-bottom: 8px;
|
flex: 1;
|
||||||
height: 36px;
|
display: flex;
|
||||||
line-height: 36px;
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.el-col {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
width: 80%;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
|
||||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
|
||||||
font-size: 16px;
|
|
||||||
color: #409eff;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
height: calc(100% - 45px);
|
height: 100%;
|
||||||
|
flex: 3;
|
||||||
|
|
||||||
.table-box {
|
.table-box {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@ -44,7 +44,7 @@ import { ref, watch, nextTick, computed } from 'vue'
|
|||||||
import { ElMessage, ElTree, TreeNode, ElMessageBox, ElBadge } from 'element-plus'
|
import { ElMessage, ElTree, TreeNode, ElMessageBox, ElBadge } from 'element-plus'
|
||||||
import { paramList, paramTree, getdef, updateParam } from '@/api/liswork/xtwh/ComOpt'
|
import { paramList, paramTree, getdef, updateParam } from '@/api/liswork/xtwh/ComOpt'
|
||||||
import { getFirstLetter } from '@/utils/pinyin'
|
import { getFirstLetter } from '@/utils/pinyin'
|
||||||
|
import { formatDict, getDictData, dictData } from '@/hooks';
|
||||||
import SysGlobal from './components/sysGlobal/index.vue'
|
import SysGlobal from './components/sysGlobal/index.vue'
|
||||||
import SysInput from './components/sysInput/index.vue'
|
import SysInput from './components/sysInput/index.vue'
|
||||||
import SysReport from './components/sysReport/index.vue'
|
import SysReport from './components/sysReport/index.vue'
|
||||||
@ -239,7 +239,9 @@ const getDeptTree = async (): Promise<void> => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getDictData('XMGL', 'MD')
|
||||||
|
})
|
||||||
// ========== 初始化 ==========
|
// ========== 初始化 ==========
|
||||||
getDeptTree()
|
getDeptTree()
|
||||||
</script>
|
</script>
|
||||||
@ -332,9 +334,6 @@ getDeptTree()
|
|||||||
|
|
||||||
.table-col {
|
.table-col {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
// 仪器标题行样式
|
// 仪器标题行样式
|
||||||
.yq-title-row {
|
.yq-title-row {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user