fix: BUG修改
This commit is contained in:
parent
42444adfab
commit
2908677015
@ -3,7 +3,7 @@ NODE_ENV = 'development'
|
||||
|
||||
# 本地环境接口地址(/api/index.ts文件中使用)
|
||||
VITE_API_URL = 'http://192.168.34.155:6688'
|
||||
# VITE_API_URL = 'http://182.90.224.147'
|
||||
# VITE_API_URL = "http://182.90.224.147:6688"
|
||||
|
||||
# 上传
|
||||
VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='
|
||||
|
||||
@ -4,6 +4,7 @@ NODE_ENV = "production"
|
||||
# 线上环境接口地址(easymock)
|
||||
# VITE_API_URL = "http://139.9.66.234:6688"
|
||||
VITE_API_URL = "http://182.90.224.147:6688"
|
||||
# VITE_API_URL = "https://localhost:6688"
|
||||
|
||||
# 打包
|
||||
VITE_ULD_API_URL = 'http://182.90.224.147:8012/onlinePreview?url='
|
||||
|
||||
7314
package-lock.json
generated
7314
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -69,7 +69,7 @@
|
||||
"autoprefixer": "^10.4.14",
|
||||
"commitizen": "^4.2.4",
|
||||
"cz-git": "^1.3.2",
|
||||
"eslint": "^8.14.0",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-vue": "^8.7.1",
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
overrideBrowserslist: [
|
||||
"Android 4.1",
|
||||
"iOS 7.1",
|
||||
"Chrome > 31",
|
||||
"ff > 31",
|
||||
"ie >= 8",
|
||||
"last 10 versions" // 所有主流浏览器最近10版本用
|
||||
],
|
||||
grid: true
|
||||
},
|
||||
"postcss-pxtorem": {
|
||||
rootValue: 192, // 设计稿宽度的1/ 10
|
||||
propList: ["*", "!border"], // 除 border 外所有px 转 rem
|
||||
selectorBlackList: [".el-"] // 过滤掉.el-开头的class,不进行rem转换
|
||||
}
|
||||
}
|
||||
};
|
||||
// module.exports = {
|
||||
// plugins: {
|
||||
// autoprefixer: {
|
||||
// overrideBrowserslist: [
|
||||
// "Android 4.1",
|
||||
// "iOS 7.1",
|
||||
// "Chrome > 31",
|
||||
// "ff > 31",
|
||||
// "ie >= 8",
|
||||
// "last 10 versions" // 所有主流浏览器最近10版本用
|
||||
// ],
|
||||
// grid: true
|
||||
// },
|
||||
// "postcss-pxtorem": {
|
||||
// rootValue: 192, // 设计稿宽度的1/ 10
|
||||
// propList: ["*", "!border"], // 除 border 外所有px 转 rem
|
||||
// selectorBlackList: [".el-"] // 过滤掉.el-开头的class,不进行rem转换
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
||||
@ -250,8 +250,25 @@ interface props {
|
||||
// 是否可以通过点击 modal 关闭 Dialog
|
||||
"close-on-click-modal"?: boolean;
|
||||
}
|
||||
const props = defineProps<props>();
|
||||
|
||||
const props = defineProps({
|
||||
formData: Object,
|
||||
formConfig: { type: [Object, String] },
|
||||
// 以下是el-dialog 的配置
|
||||
visible: Boolean,
|
||||
// dialog配置
|
||||
width: { type: [String, Number] },
|
||||
// 弹框标题
|
||||
title: String,
|
||||
// 是否为全屏 Dialog
|
||||
fullscreen: Boolean,
|
||||
// 为 Dialog 启用可拖拽功能
|
||||
draggable: Boolean,
|
||||
// Dialog 自身是否插入至 body 元素上。 嵌套的 Dialog 必须指定该属性并赋值为 true
|
||||
"append-to-body": Boolean,
|
||||
// 是否可以通过点击 modal 关闭 Dialog
|
||||
"close-on-click-modal": Boolean
|
||||
});
|
||||
console.log("props", props);
|
||||
// 生成事件对象,数组中就是对象名
|
||||
const emit = defineEmits(["update:visible", "confirm"]);
|
||||
|
||||
@ -313,6 +330,7 @@ onMounted(() => {
|
||||
.el-table-border {
|
||||
border: 1px #eee solid;
|
||||
}
|
||||
|
||||
// :deep(.el-scrollbar__view) {
|
||||
// width: 100%;
|
||||
// }
|
||||
@ -322,39 +340,48 @@ onMounted(() => {
|
||||
:deep(.el-select) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.dialogTopTitle) {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
:deep(.el-date-editor) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.my-header) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.el-form) {
|
||||
padding: 0 8%;
|
||||
// .el-form-item {
|
||||
// color: #000;
|
||||
// }
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
// 标记地图icon
|
||||
// :deep(.el-input__wrapper) {
|
||||
// padding: 1px 10px 0 11px;
|
||||
// }
|
||||
}
|
||||
|
||||
:deep(.el-dialog__footer) {
|
||||
text-align: center;
|
||||
// margin: -36px 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
// 暂无数据
|
||||
:deep(.el-table__empty-text) {
|
||||
min-height: 300px;
|
||||
@ -363,6 +390,7 @@ onMounted(() => {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// .dialogForm :deep(.el-dialog__body) {
|
||||
// min-height: 400px;
|
||||
// }
|
||||
|
||||
@ -33,7 +33,10 @@ const setText = val => {
|
||||
toRaw(myQuillEditor.value).setHTML(val);
|
||||
};
|
||||
|
||||
defineExpose<{ clearText: typeof clearText; setText: typeof setText }>({ clearText, setText });
|
||||
defineExpose<{ clearText: typeof clearText; setText: typeof setText }>({
|
||||
clearText,
|
||||
setText
|
||||
});
|
||||
|
||||
const myQuillEditor = ref();
|
||||
|
||||
@ -104,6 +107,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
toRaw(myQuillEditor.value).setHTML(props.value);
|
||||
console.log(toRaw(myQuillEditor.value));
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
14
src/main.ts
14
src/main.ts
@ -8,10 +8,6 @@ import "@/styles/common.scss";
|
||||
import "@/assets/iconfont/iconfont.scss";
|
||||
// font css
|
||||
import "@/assets/fonts/font.scss";
|
||||
// element plus
|
||||
import ElementPlus from "element-plus";
|
||||
// element icons
|
||||
import * as Icons from "@element-plus/icons-vue";
|
||||
// element css
|
||||
import "element-plus/dist/index.css";
|
||||
// element dark(内置暗黑模式)
|
||||
@ -20,6 +16,12 @@ import "element-plus/theme-chalk/dark/css-vars.css";
|
||||
import "@/styles/theme/element-dark.scss";
|
||||
// custom element css
|
||||
import "@/styles/element.scss";
|
||||
// svg icons
|
||||
import "virtual:svg-icons-register";
|
||||
// element plus
|
||||
import ElementPlus from "element-plus";
|
||||
// element icons
|
||||
import * as Icons from "@element-plus/icons-vue";
|
||||
// custom directives
|
||||
import directives from "@/directives/index";
|
||||
// vue Router
|
||||
@ -28,10 +30,8 @@ import router from "@/routers/index";
|
||||
import I18n from "@/languages/index";
|
||||
// pinia store
|
||||
import pinia from "@/stores/index";
|
||||
// svg icons
|
||||
import "virtual:svg-icons-register";
|
||||
// rem自适应
|
||||
import "amfe-flexible/index.js";
|
||||
// import "amfe-flexible/index.js";
|
||||
|
||||
// errorHandler
|
||||
// import errorHandler from "@/utils/errorHandler";
|
||||
|
||||
@ -153,7 +153,7 @@
|
||||
|
||||
// font-weight: 700;
|
||||
font-family: "siyuan_Medium";
|
||||
font-size: 16px;
|
||||
font-size: 1rem;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ const handleEditItem = async (index: number, row: any) => {
|
||||
if (index === 1) {
|
||||
formConfig.formItemConfig[1].disabled = false;
|
||||
formConfig.formItemConfig[2].disabled = false;
|
||||
title.value = "新增监控";
|
||||
title.value = "新增设备";
|
||||
formData.value = reactive({
|
||||
name: "",
|
||||
code: "",
|
||||
@ -247,7 +247,7 @@ const handleEditItem = async (index: number, row: any) => {
|
||||
} else {
|
||||
formConfig.formItemConfig[1].disabled = true;
|
||||
formConfig.formItemConfig[2].disabled = true;
|
||||
title.value = "编辑监控";
|
||||
title.value = "编辑设备";
|
||||
formData.value = reactive({ ...row });
|
||||
row.lng == null ? (address.value = { lng: undefined, lat: undefined }) : (address.value = { lng: +row.lng, lat: +row.lat });
|
||||
// 判断后端返回的经纬度是不是为null
|
||||
|
||||
@ -222,7 +222,7 @@ const getTableList = (params: any) => {
|
||||
const handleEditItem = async (index: number, row: any) => {
|
||||
if (index === 1) {
|
||||
formConfig.formItemConfig[1].disabled = false;
|
||||
title.value = "新增监控";
|
||||
title.value = "新增设备";
|
||||
formData.value = reactive({
|
||||
name: "",
|
||||
code: "",
|
||||
@ -235,7 +235,7 @@ const handleEditItem = async (index: number, row: any) => {
|
||||
});
|
||||
} else {
|
||||
formConfig.formItemConfig[1].disabled = true;
|
||||
title.value = "编辑监控";
|
||||
title.value = "编辑设备";
|
||||
formData.value = reactive({ ...row });
|
||||
// 判断后端返回的经纬度是不是为null
|
||||
row.lng === null
|
||||
|
||||
@ -24,12 +24,13 @@
|
||||
<el-input v-model="leftForm.title" placeholder="请输入主题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="content">
|
||||
<el-input
|
||||
<!-- <el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 18, maxRows: 18 }"
|
||||
v-model="leftForm.content"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
/> -->
|
||||
<Editor ref="editorRef" style="flex: 1" :value="leftForm.content" @updateValue="getMsg" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-table
|
||||
@ -102,7 +103,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="govNoticeNew">
|
||||
import { ref, reactive, onMounted, watch, computed, onUnmounted } from "vue";
|
||||
import { ref, reactive, onMounted, watch, computed, onUnmounted, toRaw } from "vue";
|
||||
import { ElMessage, FormRules, FormInstance } from "element-plus";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
@ -113,6 +114,7 @@ import { getgovNamelist, getentNamelist, getproNamelist } from "@/api/modules/go
|
||||
import { addNotice, noticeeditmyPost } from "@/api/modules/common";
|
||||
import type { Options } from "@/views/goverment/approve/company/components/unit-table.vue";
|
||||
import type { AnnexFile } from "@/api/types";
|
||||
import Editor from "@/components/Editor/index.vue";
|
||||
|
||||
type AnnexFilesOptions = Options & {
|
||||
files: UploadFile[];
|
||||
@ -129,6 +131,7 @@ interface searchFormType {
|
||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||
const route = useRoute();
|
||||
|
||||
const editorRef = ref<typeof Editor>();
|
||||
const store = GlobalStore();
|
||||
const radio = ref(0);
|
||||
const keyName = ref("");
|
||||
@ -180,7 +183,10 @@ const rules = reactive<FormRules>({
|
||||
const handleClose = (row: acceptNameList) => {
|
||||
tags.value.splice(tags.value.indexOf(row), 1);
|
||||
};
|
||||
|
||||
// 富文本编辑器的传入事件
|
||||
const getMsg = val => {
|
||||
leftForm.value.content = val;
|
||||
};
|
||||
const handlechange = e => {
|
||||
current.value.files = e.map(item => {
|
||||
item.label = current.value.dictLabel;
|
||||
@ -304,6 +310,7 @@ const reset = () => {
|
||||
annexFileList.value = [{ fileName: "" }];
|
||||
keyName.value = "";
|
||||
value.value = [];
|
||||
editorRef.value?.clearText();
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
@ -325,6 +332,7 @@ onMounted(async () => {
|
||||
if (store.Message) {
|
||||
// searchForm.value.type = store.Message.type;
|
||||
searchForm.value.type = typeList.value[Number(store.Message.type)].value;
|
||||
editorRef.value.setText(leftForm.value.content);
|
||||
console.log(searchForm.value.type);
|
||||
|
||||
leftForm.value = store.Message;
|
||||
|
||||
@ -75,7 +75,7 @@ const columns: ColumnProps[] = [
|
||||
label: "文件标题",
|
||||
search: { el: "input" }
|
||||
},
|
||||
{ prop: "content", label: "文件内容", search: { el: "input" } },
|
||||
{ prop: "content", label: "文件内容", search: { el: "input" }, type: "html" },
|
||||
{ prop: "createTime", label: "发布时间" },
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 240 }
|
||||
];
|
||||
@ -108,6 +108,7 @@ const rowClick = (row: any, column: ColumnProps) => {
|
||||
|
||||
// 修改数据按钮
|
||||
const handleEditItem = async (row: any) => {
|
||||
console.log(row);
|
||||
const { result } = await getDetailPolicy({ policyId: row.policyId });
|
||||
store.Message = result;
|
||||
router.push({ path: "/goverment/policyLows/releaseLows/index" });
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="footer flx-center">
|
||||
<el-button class="cancel" v-if="!store.Message" @click="onReset">重置</el-button>
|
||||
<el-button class="cancel" v-if="!store.Message" @click="resetForm">重置</el-button>
|
||||
<el-button class="cancel" v-else @click="onCancel">取消</el-button>
|
||||
<el-button type="primary" @click="confirm(ReleaseLowsFormRef, formData)"> 发布 </el-button>
|
||||
</div>
|
||||
@ -106,7 +106,10 @@ const onRemove: UploadProps["onRemove"] = (file, uploadFiles) => {
|
||||
const onCancel = () => {
|
||||
router.go(-1);
|
||||
};
|
||||
|
||||
const resetForm = () => {
|
||||
onReset();
|
||||
editorRef.value?.clearText();
|
||||
};
|
||||
// 标记表单文件上传校验
|
||||
const confirm = async (formEl: FormInstance | undefined, params: any) => {
|
||||
if (!formEl) return;
|
||||
|
||||
@ -223,7 +223,7 @@ const handleEditItem = async (index: number, row: any) => {
|
||||
if (index === 1) {
|
||||
formConfig.formItemConfig[1].disabled = false;
|
||||
formConfig.formItemConfig[2].disabled = false;
|
||||
title.value = "新增监控";
|
||||
title.value = "新增设备";
|
||||
formData.value = reactive({
|
||||
name: "",
|
||||
code: "",
|
||||
@ -237,7 +237,7 @@ const handleEditItem = async (index: number, row: any) => {
|
||||
} else {
|
||||
formConfig.formItemConfig[1].disabled = true;
|
||||
formConfig.formItemConfig[2].disabled = true;
|
||||
title.value = "编辑监控";
|
||||
title.value = "编辑设备";
|
||||
formData.value = reactive({ ...row });
|
||||
// 判断后端返回的经纬度是不是为null
|
||||
row.lng === null
|
||||
|
||||
@ -112,7 +112,7 @@ const formData = ref<formData>({
|
||||
const handleEditItem = async (index: number, row: any) => {
|
||||
if (index === 1) {
|
||||
formConfig.formItemConfig[1].disabled = false;
|
||||
title.value = "新增监控";
|
||||
title.value = "新增设备";
|
||||
formData.value = reactive({
|
||||
name: "",
|
||||
code: "",
|
||||
@ -125,7 +125,7 @@ const handleEditItem = async (index: number, row: any) => {
|
||||
});
|
||||
} else {
|
||||
formConfig.formItemConfig[1].disabled = true;
|
||||
title.value = "编辑监控";
|
||||
title.value = "编辑设备";
|
||||
formData.value = reactive({ ...row });
|
||||
// 判断后端返回的经纬度是不是为null
|
||||
row.lng === null
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user