lcw
This commit is contained in:
@ -11,7 +11,6 @@
|
||||
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
|
||||
</FormMessage>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -21,11 +20,12 @@ import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, watch, computed } from "vue";
|
||||
import { addJudgmentCommandList, editJudgmentCommand, getJudgmentCommandDetail } from "@/api/huiShangyp/judgmentCommand.js"
|
||||
// import { getItem } from '@//utils/storage.js'
|
||||
|
||||
import { useRouter } from 'vue-router'
|
||||
const emit = defineEmits(["updateDate", "getList"]);
|
||||
const props = defineProps({
|
||||
dict: Object
|
||||
});
|
||||
const router = useRouter()
|
||||
const imgMsg = ref([])
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogForm = ref(false); //弹窗
|
||||
@ -118,6 +118,7 @@ const close = () => {
|
||||
listQuery.value = {};
|
||||
dialogForm.value = false;
|
||||
loading.value = false;
|
||||
router.replace({ path: '/judgmentCommand' })// 移除id 避免刷新一直带参数
|
||||
};
|
||||
|
||||
defineExpose({ init });
|
||||
|
||||
@ -61,18 +61,11 @@ import FeedbackDialog from "./components/FeedbackDialog.vue";
|
||||
import { getItem } from '@//utils/storage.js'
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_YPFS, D_BZ_YPLX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX")
|
||||
const detailDiloag = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
const userInfo = ref()
|
||||
onMounted(() => {
|
||||
userInfo.value = getItem('deptId')[0]
|
||||
tabHeightFn()
|
||||
if (route.query.id) {
|
||||
detailDiloag.value.init('edit', {
|
||||
id: route.query.id
|
||||
});
|
||||
return
|
||||
}
|
||||
getList()
|
||||
});
|
||||
|
||||
@ -149,8 +142,13 @@ const tabHeightFn = () => {
|
||||
};
|
||||
};
|
||||
const route = useRoute()
|
||||
|
||||
const addForm = ref(null)
|
||||
watch(() => route.query.id, (val) => {
|
||||
console.log('val: ', val);
|
||||
if (val) {
|
||||
addForm.value.init('detail', {id:val}, '01');
|
||||
}
|
||||
},{deep:true});
|
||||
const feedbackDialog = ref(false)
|
||||
const currentFeedbackRow = ref({})
|
||||
const getDataById = (type, row) => {
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
* @property {Array} fj - 附件数组
|
||||
* @property {string} wcqk - 完成情况(01 准备中、02 已完成)
|
||||
*/
|
||||
|
||||
import { qcckGet } from "@/api/qcckApi.js";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import UploadFile from "@/components/MyComponents/Upload/index.vue";
|
||||
// import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue"
|
||||
@ -214,12 +214,13 @@ watch(() => listQuery.value.jsdxBmDm, (val) => {
|
||||
})
|
||||
})
|
||||
// 初始化数据
|
||||
|
||||
const init = (type, row, wjlb) => {
|
||||
dialogForm.value = true;
|
||||
title.value = type == "add" ? "新增" : type == "edit" ? "编辑" : "详情";
|
||||
outRow.value = row
|
||||
if (row) {
|
||||
getDataById(row.id)
|
||||
getDataById(row.id )
|
||||
} else {
|
||||
listQuery.value = {
|
||||
bglx: props.bglx, // 报告类型 01 战术研判 02战略研判
|
||||
@ -232,7 +233,7 @@ const init = (type, row, wjlb) => {
|
||||
};
|
||||
// 根据id查询详情
|
||||
const getDataById = (id) => {
|
||||
sjzlGetInfo(id).then((res) => {
|
||||
qcckGet({},'/mosty-gsxt/gsxtYpbg/'+id).then((res) => {
|
||||
listQuery.value = res || {};
|
||||
/** @type {Array<JudgmentDept>} 参与研判部门数据数组 */
|
||||
const cyypList = Array.isArray(res.cyypList) ? res.cyypList : []
|
||||
|
||||
@ -13,19 +13,19 @@
|
||||
</FormMessage>
|
||||
<div class="cntBox">
|
||||
<!-- 工具栏 -->
|
||||
<Toolbar
|
||||
style="border-bottom: 1px solid #ccc"
|
||||
<Toolbar
|
||||
style="border-bottom: 1px solid #ccc"
|
||||
:editor="editorRef"
|
||||
:defaultConfig="toolbarConfig"
|
||||
:mode="mode" />
|
||||
<!-- 编辑器 -->
|
||||
<Editor
|
||||
:style="`height: 480px; overflow-y: hidden`"
|
||||
v-model="textContent"
|
||||
<Editor
|
||||
:style="`height: 480px; overflow-y: hidden`"
|
||||
v-model="textContent"
|
||||
:defaultConfig="editorConfig"
|
||||
:mode="mode"
|
||||
@onCreated="handleCreated"
|
||||
@onChange="handChange"
|
||||
:mode="mode"
|
||||
@onCreated="handleCreated"
|
||||
@onChange="handChange"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="listQuery.id" style="display: flex; justify-content: center;">
|
||||
@ -47,6 +47,7 @@ import ExtractionText from "@/components/ExtractionText/index.vue";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import "@wangeditor/editor/dist/css/style.css";
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
// import Consultation from './consultation.vue'
|
||||
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
||||
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, shallowRef, onBeforeUnmount, watch } from "vue";
|
||||
@ -117,12 +118,33 @@ const elform = ref();
|
||||
const title = ref("");
|
||||
|
||||
// 初始化数据
|
||||
const init = (type, row) => {
|
||||
if(row) listQuery.value = JSON.parse(JSON.stringify(row));
|
||||
const init = (type, row) => {
|
||||
dialogForm.value = true;
|
||||
title.value = type == "add" ? "新增" :type == "edit"? "编辑" : "详情";
|
||||
|
||||
|
||||
if (row) {
|
||||
getDataById(row.id)
|
||||
}
|
||||
// listQuery.value = JSON.parse(JSON.stringify(row));
|
||||
|
||||
setEditorTextContent()
|
||||
};
|
||||
// 根据id查询详情
|
||||
const getDataById = (id) => {
|
||||
qcckGet({},'/mosty-gsxt/gsxtYpbg/'+id).then((res) => {
|
||||
listQuery.value = res || {};
|
||||
// /** @type {Array<JudgmentDept>} 参与研判部门数据数组 */
|
||||
// const cyypList = Array.isArray(res.cyypList) ? res.cyypList : []
|
||||
// listQuery.value.jsdxBmDm = cyypList.map(item => {
|
||||
// return item.ypbmdm
|
||||
// })
|
||||
// listQuery.value.jsdxBmMc = cyypList.map(item => {
|
||||
// return item.ypbmmc
|
||||
// })
|
||||
});
|
||||
};
|
||||
|
||||
const getText = (val) => {
|
||||
listQuery.value.fj = val.text;
|
||||
setEditorTextContent()
|
||||
@ -175,7 +197,7 @@ const handleCreated = (editor) => {
|
||||
};
|
||||
//内容发生变化
|
||||
const handChange = (editor) => {
|
||||
|
||||
|
||||
// 判断是否是一个空段落,是空就传空文本
|
||||
};
|
||||
onBeforeUnmount(() => {
|
||||
@ -183,12 +205,13 @@ onBeforeUnmount(() => {
|
||||
if (editor) editor.destroy();
|
||||
});
|
||||
|
||||
|
||||
const router = useRouter();
|
||||
// 关闭
|
||||
const close = () => {
|
||||
loading.value = false;
|
||||
dialogForm.value = false;
|
||||
listQuery.value = {}
|
||||
router.replace({ path: '/strategicResearchs' })// 移除id 避免刷新一直带参数
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -65,28 +65,25 @@ import AddForm from "./addForm.vue";
|
||||
import addMeeting from "./addMeeting.vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_YPFS, D_BZ_YPLX, D_GS_BQ_LX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX", "D_GS_BQ_LX")
|
||||
|
||||
/** 报告弹框 */
|
||||
const reportTc = ref();
|
||||
/** 会议弹框 */
|
||||
const meetingTc = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
onMounted(() => {
|
||||
tabHeightFn()
|
||||
if (route.query.id) {
|
||||
nextTick(() => {
|
||||
addForm.value && addForm.value.init('edit', {
|
||||
id: route.query.id
|
||||
});
|
||||
router.replace({ path: '/tacticalResearch' })// 移除id 避免刷新一直带参数
|
||||
})
|
||||
}
|
||||
getList()
|
||||
});
|
||||
|
||||
watch(() => route.query.id, (val) => {
|
||||
if (val) {
|
||||
nextTick(() => {
|
||||
reportTc.value && reportTc.value.init('edit', {
|
||||
id: val
|
||||
});
|
||||
})
|
||||
}
|
||||
},{deep:true});
|
||||
|
||||
|
||||
// 提交审核
|
||||
|
||||
Reference in New Issue
Block a user