|
@@ -13,16 +13,14 @@
|
|
|
:model="queryParams"
|
|
:model="queryParams"
|
|
|
ref="queryFormRef"
|
|
ref="queryFormRef"
|
|
|
:inline="true"
|
|
:inline="true"
|
|
|
- label-width="68px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ label-width="68px">
|
|
|
<el-form-item label="查询条件" prop="orderName">
|
|
<el-form-item label="查询条件" prop="orderName">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.orderName"
|
|
v-model="queryParams.orderName"
|
|
|
placeholder="请输入查询条件"
|
|
placeholder="请输入查询条件"
|
|
|
clearable
|
|
clearable
|
|
|
@keyup.enter="handleQuery"
|
|
@keyup.enter="handleQuery"
|
|
|
- class="!w-240px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="!w-240px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -32,19 +30,21 @@
|
|
|
start-placeholder="开始日期"
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
- class="!w-220px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="!w-220px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
- <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
|
|
- <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
|
|
|
|
+ <el-button @click="handleQuery"
|
|
|
|
|
+ ><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button @click="resetQuery"
|
|
|
|
|
+ ><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
|
|
|
|
|
+ >
|
|
|
<el-button
|
|
<el-button
|
|
|
type="success"
|
|
type="success"
|
|
|
plain
|
|
plain
|
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
|
- v-hasPermi="['rq:iot-opeation-fill:export']"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ v-hasPermi="['rq:iot-opeation-fill:export']">
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -73,20 +73,16 @@
|
|
|
align="center"
|
|
align="center"
|
|
|
prop="createTime"
|
|
prop="createTime"
|
|
|
:formatter="dateFormatter"
|
|
:formatter="dateFormatter"
|
|
|
- width="180px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ width="180px" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<Pagination
|
|
<Pagination
|
|
|
:total="total"
|
|
:total="total"
|
|
|
v-model:page="queryParams.pageNo"
|
|
v-model:page="queryParams.pageNo"
|
|
|
v-model:limit="queryParams.pageSize"
|
|
v-model:limit="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ @pagination="getList" />
|
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -94,15 +90,15 @@ import { dateFormatter } from '@/utils/formatTime'
|
|
|
import download from '@/utils/download'
|
|
import download from '@/utils/download'
|
|
|
import { IotOpeationFillApi, IotOpeationFillVO } from '@/api/pms/iotopeationfill'
|
|
import { IotOpeationFillApi, IotOpeationFillVO } from '@/api/pms/iotopeationfill'
|
|
|
import IotOpeationFillForm from './IotOpeationFillForm.vue'
|
|
import IotOpeationFillForm from './IotOpeationFillForm.vue'
|
|
|
-import * as UserApi from "@/api/system/user";
|
|
|
|
|
-import {defaultProps,handleTree} from "@/utils/tree";
|
|
|
|
|
-import * as DeptApi from "@/api/system/dept";
|
|
|
|
|
-import * as PostApi from "@/api/system/post";
|
|
|
|
|
-import {onMounted, ref} from "vue";
|
|
|
|
|
-import {DeptTreeItem} from "@/api/system/dept";
|
|
|
|
|
-import DeptTree from "@/views/system/user/DeptTree.vue";
|
|
|
|
|
-import {useUserStore} from "@/store/modules/user";
|
|
|
|
|
-import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
|
|
|
|
|
|
+import * as UserApi from '@/api/system/user'
|
|
|
|
|
+import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
|
|
+import * as DeptApi from '@/api/system/dept'
|
|
|
|
|
+import * as PostApi from '@/api/system/post'
|
|
|
|
|
+import { onMounted, ref } from 'vue'
|
|
|
|
|
+import { DeptTreeItem } from '@/api/system/dept'
|
|
|
|
|
+import DeptTree from '@/views/system/user/DeptTree.vue'
|
|
|
|
|
+import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
|
|
/** 运行记录填报 列表 */
|
|
/** 运行记录填报 列表 */
|
|
|
defineOptions({ name: 'FillOrderInfo2' })
|
|
defineOptions({ name: 'FillOrderInfo2' })
|
|
|
const deptList = ref<DeptTreeItem[]>([]) // 树形结构部门列表
|
|
const deptList = ref<DeptTreeItem[]>([]) // 树形结构部门列表
|
|
@@ -113,14 +109,23 @@ const loading = ref(true) // 列表的加载中
|
|
|
const list = ref<IotOpeationFillVO[]>([]) // 列表的数据
|
|
const list = ref<IotOpeationFillVO[]>([]) // 列表的数据
|
|
|
const total = ref(0) // 列表的总页数
|
|
const total = ref(0) // 列表的总页数
|
|
|
const { params, name } = useRoute() // 查询参数
|
|
const { params, name } = useRoute() // 查询参数
|
|
|
-const deptId = params.deptId;
|
|
|
|
|
-const isFill = params.isFill;
|
|
|
|
|
-const createTime = params.createTime;
|
|
|
|
|
|
|
+const deptId = params.deptId
|
|
|
|
|
+const isFill = params.isFill
|
|
|
|
|
+const createTime = params.createTime
|
|
|
|
|
+const normalizeRouteCreateTime = (value: unknown) => {
|
|
|
|
|
+ if (Array.isArray(value)) {
|
|
|
|
|
+ return value.filter((item): item is string => typeof item === 'string' && item)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (typeof value === 'string') {
|
|
|
|
|
+ return value.split(',').filter(Boolean)
|
|
|
|
|
+ }
|
|
|
|
|
+ return []
|
|
|
|
|
+}
|
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
|
const dialogTitle = ref('') // 弹窗的标题
|
|
const dialogTitle = ref('') // 弹窗的标题
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
|
|
-const selectedDeptId = ref(null); // 通过store存储的部门id 由父组件传递过来
|
|
|
|
|
|
|
+const selectedDeptId = ref(null) // 通过store存储的部门id 由父组件传递过来
|
|
|
|
|
|
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
@@ -138,7 +143,7 @@ const queryParams = reactive({
|
|
|
teamName: undefined,
|
|
teamName: undefined,
|
|
|
dutyName: undefined,
|
|
dutyName: undefined,
|
|
|
creDate: [],
|
|
creDate: [],
|
|
|
- createTime: [],
|
|
|
|
|
|
|
+ createTime: []
|
|
|
})
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
@@ -158,18 +163,16 @@ const getList = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/** 打开弹窗 */
|
|
/** 打开弹窗 */
|
|
|
const open = async (type: string, id?: number) => {
|
|
const open = async (type: string, id?: number) => {
|
|
|
dialogVisible.value = true
|
|
dialogVisible.value = true
|
|
|
dialogTitle.value = type
|
|
dialogTitle.value = type
|
|
|
formType.value = type
|
|
formType.value = type
|
|
|
- queryParams.deptId = id;
|
|
|
|
|
|
|
+ queryParams.deptId = id
|
|
|
// 修改时,设置数据
|
|
// 修改时,设置数据
|
|
|
if (id) {
|
|
if (id) {
|
|
|
- getList();
|
|
|
|
|
|
|
+ getList()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
|
|
|
|
|
@@ -181,7 +184,7 @@ const handleQuery = () => {
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = () => {
|
|
const resetQuery = () => {
|
|
|
- queryParams.deptId = useUserStore().getUser.deptId;
|
|
|
|
|
|
|
+ queryParams.deptId = useUserStore().getUser.deptId
|
|
|
queryParams.createTime = null
|
|
queryParams.createTime = null
|
|
|
queryFormRef.value.resetFields()
|
|
queryFormRef.value.resetFields()
|
|
|
handleQuery()
|
|
handleQuery()
|
|
@@ -224,19 +227,20 @@ const handleExport = async () => {
|
|
|
/** 初始化 **/
|
|
/** 初始化 **/
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
if (deptId) {
|
|
if (deptId) {
|
|
|
- queryParams.deptId = deptId;
|
|
|
|
|
|
|
+ queryParams.deptId = deptId
|
|
|
}
|
|
}
|
|
|
if (isFill == 2) {
|
|
if (isFill == 2) {
|
|
|
- queryParams.isFill = null;
|
|
|
|
|
|
|
+ queryParams.isFill = null
|
|
|
} else {
|
|
} else {
|
|
|
if (isFill) {
|
|
if (isFill) {
|
|
|
- queryParams.isFill = isFill;
|
|
|
|
|
|
|
+ queryParams.isFill = isFill
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(createTime){
|
|
|
|
|
- queryParams.createTime = createTime;
|
|
|
|
|
|
|
+ const routeCreateTime = normalizeRouteCreateTime(createTime)
|
|
|
|
|
+ if (routeCreateTime.length) {
|
|
|
|
|
+ queryParams.createTime = routeCreateTime
|
|
|
}
|
|
}
|
|
|
getList()
|
|
getList()
|
|
|
- deptList.value = handleTree(await DeptApi.getSimpleDeptList());
|
|
|
|
|
|
|
+ deptList.value = handleTree(await DeptApi.getSimpleDeptList())
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|