forked from integrated_whb/integrated_whb_vue
Merge remote-tracking branch 'origin/dev' into dev
commit
b2e0e1fd9f
|
@ -6,7 +6,7 @@ import {
|
|||
getDepartmentTree,
|
||||
getLevelsCorp,
|
||||
getElectronicFenceTree,
|
||||
getListSelectTree,
|
||||
getListSelectTree, getDepartmentzTree
|
||||
} from "@/request/data_dictionary.js";
|
||||
import { ref } from "vue";
|
||||
|
||||
|
@ -384,6 +384,11 @@ export const layoutFnGetDepartmentTree = async (params) => {
|
|||
const resData = await getDepartmentTree(params);
|
||||
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) => {
|
||||
const resData = await getElectronicFenceTree(params);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { layoutFnGetDepartmentTree } from "@/assets/js/data_dictionary";
|
||||
import { layoutFnGetDepartmentzTree } from "@/assets/js/data_dictionary";
|
||||
import { useVModel } from "@vueuse/core";
|
||||
|
||||
defineOptions({
|
||||
|
@ -57,7 +57,7 @@ const props = defineProps({
|
|||
});
|
||||
const emits = defineEmits(["update:modelValue"]);
|
||||
const modelValue = useVModel(props, "modelValue", emits);
|
||||
const departmentTree = await layoutFnGetDepartmentTree({
|
||||
const departmentTree = await layoutFnGetDepartmentzTree({
|
||||
rootDisabled: props.rootDisabled,
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
v-viewer
|
||||
v-for="item in imgs"
|
||||
:key="item.IMGFILES_ID"
|
||||
:src="VITE_FILE_URL + item.FILEPATH"
|
||||
:src="
|
||||
item.FILEPATH ? VITE_FILE_URL + item.FILEPATH : VITE_FILE_URL + item
|
||||
"
|
||||
width="100"
|
||||
height="100"
|
||||
alt=""
|
||||
|
|
|
@ -39,12 +39,18 @@ export const getUserListAllByCorp = (params) =>
|
|||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 部门树
|
||||
// 部门树 有限制只有主账号能选子集
|
||||
export const getDepartmentTree = (params) =>
|
||||
post("/department/listTree", {
|
||||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 部门树
|
||||
export const getDepartmentzTree = (params) =>
|
||||
post("/department/listzTree", {
|
||||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 电子围栏树
|
||||
export const getElectronicFenceTree = (params) =>
|
||||
post("/electronicfence/listTree", {
|
||||
|
|
|
@ -91,6 +91,13 @@
|
|||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
class="ml-10"
|
||||
type="primary"
|
||||
@click="fnSelectAll(item)"
|
||||
>
|
||||
{{ item.USER_ID.length > 0 ? "取消所有选中" : "全选" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="index !== 0"
|
||||
class="ml-10"
|
||||
|
@ -115,6 +122,20 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</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-form>
|
||||
<div class="mt-10 tc">
|
||||
|
@ -125,9 +146,11 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
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 { useRoute, useRouter } from "vue-router";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
|
@ -138,6 +161,7 @@ import {
|
|||
setSafetyMeetingData,
|
||||
} from "@/request/safety_meeting.js";
|
||||
import { uniqBy } from "lodash-es";
|
||||
import { setUploadImg } from "@/request/api.js";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
@ -151,9 +175,9 @@ const formRef = ref(null);
|
|||
const data = reactive({
|
||||
form: {
|
||||
people: [],
|
||||
file: [],
|
||||
},
|
||||
selectTemplateDialogVisible: false,
|
||||
isSelectTemplate: false,
|
||||
});
|
||||
const fnAddPeople = () => {
|
||||
data.form.people.push({
|
||||
|
@ -171,7 +195,6 @@ const fnGetData = async () => {
|
|||
return;
|
||||
}
|
||||
const resData = await getSafetyMeetingView({ SAFETY_MEETING_ID });
|
||||
const DETAIL = [];
|
||||
const people = resData.people;
|
||||
const newPeople = [];
|
||||
for (let i = 0; i < people.length; i++) {
|
||||
|
@ -180,7 +203,7 @@ const fnGetData = async () => {
|
|||
postList: [],
|
||||
userList: [],
|
||||
USER_ID: [],
|
||||
id: people[i].PROMISEPEOPLE_ID,
|
||||
id: people[i].SAFETY_MEETING_PEOPLE_ID,
|
||||
});
|
||||
for (let j = 0; j < newPeople.length; j++) {
|
||||
if (people[i].POST_ID === newPeople[j].POST_ID) {
|
||||
|
@ -189,11 +212,12 @@ const fnGetData = async () => {
|
|||
}
|
||||
}
|
||||
data.form = {
|
||||
...resData.varList,
|
||||
DETAIL,
|
||||
...resData.pd,
|
||||
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++) {
|
||||
await fnGetPostList(data.form.people[i].DEPARTMENT_ID, i, "people");
|
||||
await fnGetUserList(
|
||||
|
@ -226,6 +250,15 @@ const fnGetUserList = async (DEPARTMENT_ID, POST_ID, index, key) => {
|
|||
const resData = await getUserListAll({ DEPARTMENT_ID, POST_ID });
|
||||
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(
|
||||
1000,
|
||||
async () => {
|
||||
|
@ -240,9 +273,19 @@ const fnSubmit = debounce(
|
|||
people: JSON.stringify(people),
|
||||
SAFETY_MEETING_ID,
|
||||
};
|
||||
!SAFETY_MEETING_ID
|
||||
const resData = !SAFETY_MEETING_ID
|
||||
? await setSafetyMeetingData(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("操作成功");
|
||||
router.back();
|
||||
},
|
||||
|
|
|
@ -48,7 +48,7 @@ import {
|
|||
} from "@/request/security_commitment_pro.js";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { reactive } from "vue";
|
||||
import ViewInfo from "../template/components/view.vue";
|
||||
import ViewInfo from "./view.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const { PROMISE_ID } = route.query;
|
||||
|
|
|
@ -36,10 +36,17 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="SAFETY_MEETING_TITLE" 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 label="签字人数/涉及人数">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.SIGNATURES }}/{{ row.ALL_SIGNATURES }}
|
||||
<el-link type="primary">
|
||||
{{ row.SIGNATURES }}/{{ row.ALL_SIGNATURES }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
|
@ -50,32 +57,21 @@
|
|||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/security_commitment_pro/administration/view',
|
||||
query: { PROMISE_ID: row.PROMISE_ID },
|
||||
path: '/safety_meeting/meeting/view',
|
||||
query: { SAFETY_MEETING_ID: row.SAFETY_MEETING_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
详情
|
||||
</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"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/security_commitment_pro/administration/edit',
|
||||
query: { PROMISE_ID: row.PROMISE_ID },
|
||||
path: '/safety_meeting/meeting/add',
|
||||
query: { SAFETY_MEETING_ID: row.SAFETY_MEETING_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
|
@ -104,9 +100,8 @@
|
|||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.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 LayoutTooltipImg from "@/components/tooltip_img/index.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
|
@ -121,18 +116,6 @@ const fnResetPaginationTransfer = () => {
|
|||
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>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
@ -15,21 +15,7 @@
|
|||
{{ info.PROMISE_TERM_END }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<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-divider content-position="left">涉及人</el-divider>
|
||||
<el-descriptions :column="3" border>
|
||||
<template v-for="(item, index) in info.coverpeople" :key="item.id">
|
||||
<el-descriptions-item :label="'部门' + (index + 1)">
|
||||
|
@ -57,10 +43,6 @@
|
|||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnView">模 板</el-button>
|
||||
</div>
|
||||
<view-info
|
||||
v-model:visible="data.viewDialog.visible"
|
||||
:info="data.viewDialog.info"
|
||||
/>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
|
@ -68,7 +50,6 @@
|
|||
import { reactive, ref } from "vue";
|
||||
import { getAdministrationView } from "@/request/security_commitment_pro.js";
|
||||
import { useRoute } from "vue-router";
|
||||
import ViewInfo from "../template/components/view.vue";
|
||||
import { uniqBy } from "lodash-es";
|
||||
|
||||
const route = useRoute();
|
||||
|
|
Loading…
Reference in New Issue