forked from integrated_whb/integrated_whb_vue
Merge remote-tracking branch 'origin/dev' into dev
commit
b2e0e1fd9f
|
@ -6,7 +6,7 @@ import {
|
||||||
getDepartmentTree,
|
getDepartmentTree,
|
||||||
getLevelsCorp,
|
getLevelsCorp,
|
||||||
getElectronicFenceTree,
|
getElectronicFenceTree,
|
||||||
getListSelectTree,
|
getListSelectTree, getDepartmentzTree
|
||||||
} from "@/request/data_dictionary.js";
|
} from "@/request/data_dictionary.js";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
@ -384,6 +384,11 @@ export const layoutFnGetDepartmentTree = async (params) => {
|
||||||
const resData = await getDepartmentTree(params);
|
const resData = await getDepartmentTree(params);
|
||||||
return ref(JSON.parse(resData.zTreeNodes));
|
return ref(JSON.parse(resData.zTreeNodes));
|
||||||
};
|
};
|
||||||
|
// 部门树2
|
||||||
|
export const layoutFnGetDepartmentzTree = async (params) => {
|
||||||
|
const resData = await getDepartmentzTree(params);
|
||||||
|
return ref(JSON.parse(resData.zTreeNodes));
|
||||||
|
};
|
||||||
// 电子围栏树
|
// 电子围栏树
|
||||||
export const layoutFnGetElectronicFenceTree = async (params) => {
|
export const layoutFnGetElectronicFenceTree = async (params) => {
|
||||||
const resData = await getElectronicFenceTree(params);
|
const resData = await getElectronicFenceTree(params);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { layoutFnGetDepartmentTree } from "@/assets/js/data_dictionary";
|
import { layoutFnGetDepartmentzTree } from "@/assets/js/data_dictionary";
|
||||||
import { useVModel } from "@vueuse/core";
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
@ -57,7 +57,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:modelValue"]);
|
const emits = defineEmits(["update:modelValue"]);
|
||||||
const modelValue = useVModel(props, "modelValue", emits);
|
const modelValue = useVModel(props, "modelValue", emits);
|
||||||
const departmentTree = await layoutFnGetDepartmentTree({
|
const departmentTree = await layoutFnGetDepartmentzTree({
|
||||||
rootDisabled: props.rootDisabled,
|
rootDisabled: props.rootDisabled,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
v-viewer
|
v-viewer
|
||||||
v-for="item in imgs"
|
v-for="item in imgs"
|
||||||
:key="item.IMGFILES_ID"
|
:key="item.IMGFILES_ID"
|
||||||
:src="VITE_FILE_URL + item.FILEPATH"
|
:src="
|
||||||
|
item.FILEPATH ? VITE_FILE_URL + item.FILEPATH : VITE_FILE_URL + item
|
||||||
|
"
|
||||||
width="100"
|
width="100"
|
||||||
height="100"
|
height="100"
|
||||||
alt=""
|
alt=""
|
||||||
|
|
|
@ -39,12 +39,18 @@ export const getUserListAllByCorp = (params) =>
|
||||||
loading: false,
|
loading: false,
|
||||||
...params,
|
...params,
|
||||||
});
|
});
|
||||||
// 部门树
|
// 部门树 有限制只有主账号能选子集
|
||||||
export const getDepartmentTree = (params) =>
|
export const getDepartmentTree = (params) =>
|
||||||
post("/department/listTree", {
|
post("/department/listTree", {
|
||||||
loading: false,
|
loading: false,
|
||||||
...params,
|
...params,
|
||||||
});
|
});
|
||||||
|
// 部门树
|
||||||
|
export const getDepartmentzTree = (params) =>
|
||||||
|
post("/department/listzTree", {
|
||||||
|
loading: false,
|
||||||
|
...params,
|
||||||
|
});
|
||||||
// 电子围栏树
|
// 电子围栏树
|
||||||
export const getElectronicFenceTree = (params) =>
|
export const getElectronicFenceTree = (params) =>
|
||||||
post("/electronicfence/listTree", {
|
post("/electronicfence/listTree", {
|
||||||
|
|
|
@ -91,6 +91,13 @@
|
||||||
:value="item.USER_ID"
|
:value="item.USER_ID"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
class="ml-10"
|
||||||
|
type="primary"
|
||||||
|
@click="fnSelectAll(item)"
|
||||||
|
>
|
||||||
|
{{ item.USER_ID.length > 0 ? "取消所有选中" : "全选" }}
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="index !== 0"
|
v-if="index !== 0"
|
||||||
class="ml-10"
|
class="ml-10"
|
||||||
|
@ -115,6 +122,20 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-divider content-position="left">安全例会附件</el-divider>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="添加附件" prop="file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="data.form.file"
|
||||||
|
accept=".jpg,.jpeg,.png"
|
||||||
|
list-type="picture-card"
|
||||||
|
delete-to-server
|
||||||
|
:limit="99"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="mt-10 tc">
|
<div class="mt-10 tc">
|
||||||
|
@ -125,9 +146,11 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
|
||||||
import LayoutDepartment from "@/components/department/index.vue";
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
import { getPostListAll, getUserListAll } from "@/request/data_dictionary.js";
|
import { getPostListAll, getUserListAll } from "@/request/data_dictionary.js";
|
||||||
import { verifyDuplicateSelection } from "@/assets/js/utils.js";
|
import { addingPrefixToFile, verifyDuplicateSelection } from "@/assets/js/utils.js";
|
||||||
import { debounce } from "throttle-debounce";
|
import { debounce } from "throttle-debounce";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
@ -138,6 +161,7 @@ import {
|
||||||
setSafetyMeetingData,
|
setSafetyMeetingData,
|
||||||
} from "@/request/safety_meeting.js";
|
} from "@/request/safety_meeting.js";
|
||||||
import { uniqBy } from "lodash-es";
|
import { uniqBy } from "lodash-es";
|
||||||
|
import { setUploadImg } from "@/request/api.js";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -151,9 +175,9 @@ const formRef = ref(null);
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
people: [],
|
people: [],
|
||||||
|
file: [],
|
||||||
},
|
},
|
||||||
selectTemplateDialogVisible: false,
|
selectTemplateDialogVisible: false,
|
||||||
isSelectTemplate: false,
|
|
||||||
});
|
});
|
||||||
const fnAddPeople = () => {
|
const fnAddPeople = () => {
|
||||||
data.form.people.push({
|
data.form.people.push({
|
||||||
|
@ -171,7 +195,6 @@ const fnGetData = async () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const resData = await getSafetyMeetingView({ SAFETY_MEETING_ID });
|
const resData = await getSafetyMeetingView({ SAFETY_MEETING_ID });
|
||||||
const DETAIL = [];
|
|
||||||
const people = resData.people;
|
const people = resData.people;
|
||||||
const newPeople = [];
|
const newPeople = [];
|
||||||
for (let i = 0; i < people.length; i++) {
|
for (let i = 0; i < people.length; i++) {
|
||||||
|
@ -180,7 +203,7 @@ const fnGetData = async () => {
|
||||||
postList: [],
|
postList: [],
|
||||||
userList: [],
|
userList: [],
|
||||||
USER_ID: [],
|
USER_ID: [],
|
||||||
id: people[i].PROMISEPEOPLE_ID,
|
id: people[i].SAFETY_MEETING_PEOPLE_ID,
|
||||||
});
|
});
|
||||||
for (let j = 0; j < newPeople.length; j++) {
|
for (let j = 0; j < newPeople.length; j++) {
|
||||||
if (people[i].POST_ID === newPeople[j].POST_ID) {
|
if (people[i].POST_ID === newPeople[j].POST_ID) {
|
||||||
|
@ -189,11 +212,12 @@ const fnGetData = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data.form = {
|
data.form = {
|
||||||
...resData.varList,
|
...resData.pd,
|
||||||
DETAIL,
|
|
||||||
people: uniqBy(newPeople, "POST_ID"),
|
people: uniqBy(newPeople, "POST_ID"),
|
||||||
};
|
};
|
||||||
data.isSelectTemplate = true;
|
if (resData.imgs) {
|
||||||
|
data.form.file = addingPrefixToFile(resData.imgs);
|
||||||
|
}
|
||||||
for (let i = 0; i < data.form.people.length; i++) {
|
for (let i = 0; i < data.form.people.length; i++) {
|
||||||
await fnGetPostList(data.form.people[i].DEPARTMENT_ID, i, "people");
|
await fnGetPostList(data.form.people[i].DEPARTMENT_ID, i, "people");
|
||||||
await fnGetUserList(
|
await fnGetUserList(
|
||||||
|
@ -226,6 +250,15 @@ const fnGetUserList = async (DEPARTMENT_ID, POST_ID, index, key) => {
|
||||||
const resData = await getUserListAll({ DEPARTMENT_ID, POST_ID });
|
const resData = await getUserListAll({ DEPARTMENT_ID, POST_ID });
|
||||||
data.form[key][index].userList = resData.userList;
|
data.form[key][index].userList = resData.userList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fnSelectAll = async (item) => {
|
||||||
|
if (item.USER_ID.length > 0) {
|
||||||
|
item.USER_ID = [];
|
||||||
|
} else {
|
||||||
|
item.USER_ID = item.userList.map((item) => item.USER_ID);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const fnSubmit = debounce(
|
const fnSubmit = debounce(
|
||||||
1000,
|
1000,
|
||||||
async () => {
|
async () => {
|
||||||
|
@ -240,9 +273,19 @@ const fnSubmit = debounce(
|
||||||
people: JSON.stringify(people),
|
people: JSON.stringify(people),
|
||||||
SAFETY_MEETING_ID,
|
SAFETY_MEETING_ID,
|
||||||
};
|
};
|
||||||
!SAFETY_MEETING_ID
|
const resData = !SAFETY_MEETING_ID
|
||||||
? await setSafetyMeetingData(params)
|
? await setSafetyMeetingData(params)
|
||||||
: await setSafetyMeetingEdit(params);
|
: await setSafetyMeetingEdit(params);
|
||||||
|
const formData = new FormData();
|
||||||
|
if (data.form.file) {
|
||||||
|
for (let i = 0; i < data.form.file.length; i++) {
|
||||||
|
if (data.form.file[i].raw)
|
||||||
|
formData.append("FFILE", data.form.file[i].raw);
|
||||||
|
}
|
||||||
|
formData.append("FOREIGN_KEY", resData.SAFETY_MEETING_ID);
|
||||||
|
formData.append("TYPE", 105);
|
||||||
|
await setUploadImg(formData);
|
||||||
|
}
|
||||||
ElMessage.success("操作成功");
|
ElMessage.success("操作成功");
|
||||||
router.back();
|
router.back();
|
||||||
},
|
},
|
||||||
|
|
|
@ -48,7 +48,7 @@ import {
|
||||||
} from "@/request/security_commitment_pro.js";
|
} from "@/request/security_commitment_pro.js";
|
||||||
import { serialNumber } from "@/assets/js/utils.js";
|
import { serialNumber } from "@/assets/js/utils.js";
|
||||||
import { reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import ViewInfo from "../template/components/view.vue";
|
import ViewInfo from "./view.vue";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { PROMISE_ID } = route.query;
|
const { PROMISE_ID } = route.query;
|
||||||
|
|
|
@ -36,10 +36,17 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="SAFETY_MEETING_TITLE" label="安全例会标题" />
|
<el-table-column prop="SAFETY_MEETING_TITLE" label="安全例会标题" />
|
||||||
<el-table-column prop="SAFETY_MEETING_CONTENT" label="安全例会内容" />
|
<el-table-column prop="SAFETY_MEETING_CONTENT" label="安全例会内容" />
|
||||||
|
<el-table-column label="安全例会附件">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<layout-tooltip-img v-if="row.imgs" :imgs="row.imgs.split(',')" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="CREATTIME" label="添加时间" width="150" />
|
<el-table-column prop="CREATTIME" label="添加时间" width="150" />
|
||||||
<el-table-column label="签字人数/涉及人数">
|
<el-table-column label="签字人数/涉及人数">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
|
<el-link type="primary">
|
||||||
{{ row.SIGNATURES }}/{{ row.ALL_SIGNATURES }}
|
{{ row.SIGNATURES }}/{{ row.ALL_SIGNATURES }}
|
||||||
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="200">
|
<el-table-column label="操作" width="200">
|
||||||
|
@ -50,32 +57,21 @@
|
||||||
link
|
link
|
||||||
@click="
|
@click="
|
||||||
router.push({
|
router.push({
|
||||||
path: '/security_commitment_pro/administration/view',
|
path: '/safety_meeting/meeting/view',
|
||||||
query: { PROMISE_ID: row.PROMISE_ID },
|
query: { SAFETY_MEETING_ID: row.SAFETY_MEETING_ID },
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
查看
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
|
||||||
text
|
|
||||||
link
|
|
||||||
@click="
|
|
||||||
fnEnableOrDisable(row.STATE === '0' ? 1 : 0, row.PROMISE_ID)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ row.STATE === "0" ? "禁用" : "启用" }}
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
:disabled="row.ISSIGN !== 0"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
text
|
text
|
||||||
link
|
link
|
||||||
@click="
|
@click="
|
||||||
router.push({
|
router.push({
|
||||||
path: '/security_commitment_pro/administration/edit',
|
path: '/safety_meeting/meeting/add',
|
||||||
query: { PROMISE_ID: row.PROMISE_ID },
|
query: { SAFETY_MEETING_ID: row.SAFETY_MEETING_ID },
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -104,9 +100,8 @@
|
||||||
import { serialNumber } from "@/assets/js/utils";
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
import useListData from "@/assets/js/useListData.js";
|
import useListData from "@/assets/js/useListData.js";
|
||||||
import { getSafetyMeetingList } from "@/request/safety_meeting.js";
|
import { getSafetyMeetingList } from "@/request/safety_meeting.js";
|
||||||
import { debounce } from "throttle-debounce";
|
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
import LayoutTooltipImg from "@/components/tooltip_img/index.vue";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
@ -121,18 +116,6 @@ const fnResetPaginationTransfer = () => {
|
||||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const fnEnableOrDisable = debounce(
|
|
||||||
1000,
|
|
||||||
async (STATE) => {
|
|
||||||
const message = STATE === 0 ? "启用" : "禁用";
|
|
||||||
await ElMessageBox.confirm(`确定要${message}当前承诺书吗?`, {
|
|
||||||
type: "warning",
|
|
||||||
});
|
|
||||||
ElMessage.success(`${message}成功`);
|
|
||||||
fnResetPaginationTransfer();
|
|
||||||
},
|
|
||||||
{ atBegin: true }
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
@ -15,21 +15,7 @@
|
||||||
{{ info.PROMISE_TERM_END }}
|
{{ info.PROMISE_TERM_END }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-divider content-position="left">承诺人</el-divider>
|
<el-divider content-position="left">涉及人</el-divider>
|
||||||
<el-descriptions :column="3" border>
|
|
||||||
<template v-for="(item, index) in info.people" :key="item.id">
|
|
||||||
<el-descriptions-item :label="'部门' + (index + 1)">
|
|
||||||
{{ item.DEPTNAME }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item :label="'岗位' + (index + 1)">
|
|
||||||
{{ item.POSTNAME }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item :label="'人员' + (index + 1)">
|
|
||||||
{{ item.USERNAME?.join("、") }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</template>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-divider content-position="left">被承诺人</el-divider>
|
|
||||||
<el-descriptions :column="3" border>
|
<el-descriptions :column="3" border>
|
||||||
<template v-for="(item, index) in info.coverpeople" :key="item.id">
|
<template v-for="(item, index) in info.coverpeople" :key="item.id">
|
||||||
<el-descriptions-item :label="'部门' + (index + 1)">
|
<el-descriptions-item :label="'部门' + (index + 1)">
|
||||||
|
@ -57,10 +43,6 @@
|
||||||
<div class="tc mt-10">
|
<div class="tc mt-10">
|
||||||
<el-button type="primary" @click="fnView">模 板</el-button>
|
<el-button type="primary" @click="fnView">模 板</el-button>
|
||||||
</div>
|
</div>
|
||||||
<view-info
|
|
||||||
v-model:visible="data.viewDialog.visible"
|
|
||||||
:info="data.viewDialog.info"
|
|
||||||
/>
|
|
||||||
</layout-card>
|
</layout-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -68,7 +50,6 @@
|
||||||
import { reactive, ref } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
import { getAdministrationView } from "@/request/security_commitment_pro.js";
|
import { getAdministrationView } from "@/request/security_commitment_pro.js";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import ViewInfo from "../template/components/view.vue";
|
|
||||||
import { uniqBy } from "lodash-es";
|
import { uniqBy } from "lodash-es";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
Loading…
Reference in New Issue