提交 fd3977e5 authored 作者: gjx's avatar gjx

整体ui样式风格修改

上级 e1d15170
src/assets/images/title_bg.png

4.5 KB | W: | H:

src/assets/images/title_bg.png

7.5 KB | W: | H:

src/assets/images/title_bg.png
src/assets/images/title_bg.png
src/assets/images/title_bg.png
src/assets/images/title_bg.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,20 +3,20 @@
.@{prefix-cls} {
&-dark&-vertical .@{simple-prefix-cls}__parent {
background-color: #F7F7F7;
// background-color: @white;
color: #000;
> .@{prefix-cls}-submenu-title {
background-color: #F7F7F7;
// background-color: @white;
color: #000;
}
}
&-dark&-vertical .@{simple-prefix-cls}__children,
&-dark&-popup .@{simple-prefix-cls}__children {
background-color: #F7F7F7;
// background-color: @white;
color: #000;
> .@{prefix-cls}-submenu-title {
background-color: #F7F7F7;
// background-color: @white;
color: #000;
}
}
......
......@@ -175,6 +175,9 @@
ifShow: ({ values }) => {
return values.tdsyqrlx == '4' ? false : true;
},
dynamicRules: () => {
return [{ pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, message: '工商营业执照号格式有误', required: true }];
},
},
{
label: '企业名称',
......@@ -251,6 +254,15 @@
updateSchema({
label: '统一社会信用代码',
field: 'qrGsyyzzh',
dynamicRules: () => {
return [
{
pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/,
message: '工商营业执照号格式有误',
required: true,
},
];
},
});
updateSchema({
label: '企业名称',
......@@ -262,6 +274,9 @@
updateSchema({
label: '身份证号码',
field: 'qrGsyyzzh',
dynamicRules: () => {
return [{ pattern: /^\d{15}|(\d{17}(\d|x|X))$/, message: '身份证格式有误', required: true }];
},
});
updateSchema({
label: '自然人姓名',
......@@ -273,6 +288,15 @@
updateSchema({
label: '统一社会信用代码',
field: 'qrGsyyzzh',
dynamicRules: () => {
return [
{
pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/,
message: '工商营业执照号格式有误',
required: true,
},
];
},
});
updateSchema({
label: '政府名称',
......@@ -303,6 +327,9 @@
ifShow: ({ values }) => {
return values.qrTdsyqrlx == '4' ? false : true;
},
dynamicRules: () => {
return [{ pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, message: '工商营业执照号格式有误', required: true }];
},
},
{
label: '企业名称',
......@@ -652,6 +679,11 @@
label: '统一社会信用代码',
field: 'gsyyzzh',
show: true,
dynamicRules: () => {
return [
{ pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, message: '工商营业执照号格式有误', required: true },
];
},
});
updateSchema({
label: '企业名称',
......@@ -668,6 +700,9 @@
updateSchema({
label: '身份证号码',
field: 'gsyyzzh',
dynamicRules: () => {
return [{ pattern: /^\d{15}|(\d{17}(\d|x|X))$/, message: '身份证格式有误', required: true }];
},
show: true,
});
updateSchema({
......@@ -686,6 +721,11 @@
label: '统一社会信用代码',
field: 'gsyyzzh',
show: true,
dynamicRules: () => {
return [
{ pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, message: '工商营业执照号格式有误', required: true },
];
},
});
updateSchema({
label: '政府名称',
......
......@@ -296,7 +296,7 @@
}
.active {
background-color: #62a8d1;
background-color: @primary-color;
border-bottom: 3px solid #ffbd04;
font-weight: bold;
}
......
......@@ -430,7 +430,7 @@
transition: all 0.3s ease;
&:hover {
// color: @white;
color: @white;
}
// &:hover,
&--active {
......@@ -557,8 +557,14 @@
box-shadow: 0 0 4px 0 rgba(28, 36, 56, 0.15);
}
}
// .jeecg-menu-dark.jeecg-menu-vertical .jeecg-menu-item-active:not(.jeecg-menu-submenu),.jeecg-menu-dark.jeecg-menu-vertical .jeecg-menu-item:hover{
.jeecg-menu-item:hover {
// background-color:#EDEDED!important;
// color:#2B7DBC!important;
// }
color: #2b7dbc !important;
}
.jeecg-menu-item-active {
> div {
color: #2b7dbc !important;
}
}
</style>
......@@ -259,7 +259,7 @@
.title-move {
margin-left: 80%;
color: #0f91ed;
color: @primary-color;
cursor: pointer;
}
}
......@@ -285,7 +285,7 @@
.listRadio {
display: inline-block;
background-color: #1ca4ff;
background-color: @primary-color;
border-radius: 50%;
width: 8px;
height: 8px;
......
<template>
<div style="width: 95%;margin:0 auto;margin-top: 30px;">
<div style="width: 99%; margin: 0 auto; margin-top: 10px">
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="router.back()" v-auth="'dkdc-tbz-zltb'">返回</a-button>
<a-button type="primary" v-if="route.query.type === 'edit'" @click="handleAdd"
v-auth="'dkdc-tbz-zltb'">新增</a-button>
<a-button type="primary" v-if="route.query.type === 'edit'" @click="handleAdd" v-auth="'dkdc-tbz-zltb'">新增</a-button>
</template>
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
......@@ -16,27 +15,27 @@
</template>
<script lang="ts" name="xcjd-Supervise-LookData" setup>
import { BasicTable, TableAction, TableActionType } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { useRouter, useRoute } from 'vue-router';
import { useMessage } from '/@/hooks/web/useMessage';
import { lookDatacolumns, searchFormSchema, useSuspectsData, useCategoryData } from './data';
import { getXcjdList, SetDel,getImportUrl, getExportUrl } from './api';
// import { useModal } from '/@/components/Modal';
import { ref } from "vue";
//注册model
// const [registerModal, { openModal }] = useModal();
// let isEdit = ref(true)
let router = useRouter();
let route = useRoute();
const { createMessage } = useMessage();
import { BasicTable, TableAction, TableActionType } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { useRouter, useRoute } from 'vue-router';
import { useMessage } from '/@/hooks/web/useMessage';
import { lookDatacolumns, searchFormSchema, useSuspectsData, useCategoryData } from './data';
import { getXcjdList, SetDel, getImportUrl, getExportUrl } from './api';
// import { useModal } from '/@/components/Modal';
import { ref } from 'vue';
//注册model
// const [registerModal, { openModal }] = useModal();
// let isEdit = ref(true)
let router = useRouter();
let route = useRoute();
const { createMessage } = useMessage();
//注册table数据
const { tableContext } = useListPage({
//注册table数据
const { tableContext } = useListPage({
tableProps: {
title: '现场监督-现场监督-现场监督列表',
api: getXcjdList,
columns:lookDatacolumns,
columns: lookDatacolumns,
canResize: false,
//定义rowSelection的类型,默认是checkbox多选,可以设置成radio单选
rowKey: 'wrdkid',
......@@ -52,35 +51,35 @@ const { tableContext } = useListPage({
// },
actionColumn: {
width: 120,
fixed: 'right'
fixed: 'right',
},
beforeFetch(params) {
if (route.query.wrdkid) {
params.wrdkid = route.query.wrdkid;
} else {
createMessage.error('内容错误,请返回重试')
createMessage.error('内容错误,请返回重试');
}
},
},
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
//删除事件
async function handleDelete(record) {
await SetDel({xcjdId:record.id})
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
//删除事件
async function handleDelete(record) {
await SetDel({ xcjdId: record.id });
reload();
}
//编辑事件
function handleLook(record) {
router.push(`/xcjd/Supervise/LookData/look?xcjdId=${record.id}`)
}
//编辑事件
function handleAdd() {
router.push(`/xcjd/Supervise/LookData/form?wrdkid=${route.query.wrdkid}`)
}
/**
* 操作栏
*/
function getTableAction(record) {
}
//编辑事件
function handleLook(record) {
router.push(`/xcjd/Supervise/LookData/look?xcjdId=${record.id}`);
}
//编辑事件
function handleAdd() {
router.push(`/xcjd/Supervise/LookData/form?wrdkid=${route.query.wrdkid}`);
}
/**
* 操作栏
*/
function getTableAction(record) {
if (route.query.type === 'edit') {
return [
{
......@@ -103,8 +102,6 @@ function getTableAction(record) {
},
];
}
}
}
</script>
<style scoped></style>
\ No newline at end of file
<template>
<a-spin :spinning="loading">
<div style="width: 90%;margin: 0 auto;">
<div style="margin: 25px 0;">
<a-button type="primary" @click="router.back()" style="margin-left: 10px;">返回</a-button>
<div style="width: 99%; margin: 10px auto" class="bg-[#fff] py-2">
<div style="margin: 10px 0">
<a-button type="primary" @click="router.back()" style="margin-left: 10px">返回</a-button>
</div>
<table width="100%" style="width: 100%" border="1" cellspacing="1">
<tbody>
......@@ -36,8 +36,12 @@
<tr class="ant-table-cell ant-table-cell-ellipsis">
<td class="ant-table-cell ant-table-cell-ellipsis bgColor">督查管理</td>
<td class="ant-table-cell ant-table-cell-ellipsis" colspan="3">
<a-button preIcon="ant-design:vertical-align-bottom-outlined" style="margin-left:10px"
@click="downloadFile(data.xcjd?.jdglfj,data.xcjd?.jdglfjmc?data.xcjd?.jdglfjmc:'督察管理')" type="primary">
<a-button
preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left: 10px"
@click="downloadFile(data.xcjd?.jdglfj, data.xcjd?.jdglfjmc ? data.xcjd?.jdglfjmc : '督察管理')"
type="primary"
>
下载
</a-button>
</td>
......@@ -57,16 +61,17 @@
<!-- <span v-for="(item,index) in data.wgList">
{{ item.wd }}
</span> -->
<a-table style="margin: 15px 0;" :columns="wgcolumns" :data-source="data.wgList" bordered>
<a-table style="margin: 15px 0" :columns="wgcolumns" :data-source="data.wgList" bordered>
<template #bodyCell="{ column, text, record, index }">
<template v-if="column.dataIndex === 'wgkgjszp'">
<div style="position: relative;">
<div style="position: relative">
<a-button
preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left:10px"
v-for="(item,index) in record.wgkgjszp.split(',')"
@click="downloadFile(item,record.wgkgjszpmc?record.wgkgjszpmc:'违规开工建设照片')"
type="primary">
style="margin-left: 10px"
v-for="(item, index) in record.wgkgjszp.split(',')"
@click="downloadFile(item, record.wgkgjszpmc ? record.wgkgjszpmc : '违规开工建设照片')"
type="primary"
>
下载
</a-button>
</div>
......@@ -76,9 +81,14 @@
<a-table :columns="wrcolumns" :data-source="data.wrList" bordered>
<template #bodyCell="{ column, text, record, index }">
<template v-if="column.dataIndex === 'wgkgjszp'">
<div style="position: relative;">
<a-button preIcon="ant-design:vertical-align-bottom-outlined" style="margin-left:10px" v-for="(item,index) in record.wgkgjszp.split(',')"
@click="downloadFile(item,record.wgkgjszpmc?record.wgkgjszpmc:'污染区域照片')" type="primary">
<div style="position: relative">
<a-button
preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left: 10px"
v-for="(item, index) in record.wgkgjszp.split(',')"
@click="downloadFile(item, record.wgkgjszpmc ? record.wgkgjszpmc : '污染区域照片')"
type="primary"
>
下载
</a-button>
</div>
......@@ -90,16 +100,15 @@
</template>
<script lang="ts" setup>
import { useRoute, useRouter } from 'vue-router';
import { ref } from 'vue';
import { getLookList } from './api';
import { dictName } from "/@/utils/domUtils";
import { downloadFile } from '/@/utils/common/renderUtils';
const wrcolumns = [
import { useRoute, useRouter } from 'vue-router';
import { ref } from 'vue';
import { getLookList } from './api';
import { dictName } from '/@/utils/domUtils';
import { downloadFile } from '/@/utils/common/renderUtils';
const wrcolumns = [
{
title: '污染区域',
dataIndex: 'wgkgjsqy',
},
{
title: '纬度',
......@@ -117,12 +126,11 @@ const wrcolumns = [
title: '操作',
dataIndex: 'operation',
},
];
const wgcolumns = [
];
const wgcolumns = [
{
title: '违规开工建设区域',
dataIndex: 'wgkgjsqy',
},
{
title: '纬度',
......@@ -140,43 +148,43 @@ const wgcolumns = [
title: '操作',
dataIndex: 'operation',
},
];
const route = useRoute();
const router = useRouter();
let data = ref({
wgList:[],
wrList:[]
})
let loading = ref(true)
async function init() {
];
const route = useRoute();
const router = useRouter();
let data = ref({
wgList: [],
wrList: [],
});
let loading = ref(true);
async function init() {
// console.log(route.query.wrdkid);
// 拿到路由传参 请求接口
let result = await getLookList({ xcjdId: route.query.xcjdId })
let result = await getLookList({ xcjdId: route.query.xcjdId });
console.log(result);
data.value = result //响应式赋值
loading.value = false //加载中状态
}
init()
defineProps({
data.value = result; //响应式赋值
loading.value = false; //加载中状态
}
init();
defineProps({
data: Object,
})
});
</script>
<style scoped>
table {
table {
border-collapse: collapse;
border: 1px #dfe6ec solid
}
border: 1px #dfe6ec solid;
}
tbody tr td {
tbody tr td {
padding: 6px;
height: 40px;
}
}
.bgColor {
.bgColor {
background-color: rgba(244, 247, 249, 0.8);
text-align: center;
width: 10%;
}
}
</style>
<template>
<div style="width: 95%;margin:0 auto;margin-top: 30px;">
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
......@@ -16,24 +16,24 @@
</template>
<script lang="ts" name="xcjd-Sampling-cyList" setup>
import { BasicTable, TableAction, } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { useRouter, useRoute } from 'vue-router';
import { useMessage } from '/@/hooks/web/useMessage';
import { lookDatacolumns } from './data';
import { getCyxxList, SetDel, setAdd, addSuccess } from './api';
import { useModal } from '/@/components/Modal';
import cyModal from "./cyModal.vue";
import { ref } from "vue";
//注册model
const [registerModal, { openModal, closeModal }] = useModal();
// let isEdit = ref(true)
let router = useRouter();
let route = useRoute();
const { createMessage } = useMessage();
import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { useRouter, useRoute } from 'vue-router';
import { useMessage } from '/@/hooks/web/useMessage';
import { lookDatacolumns } from './data';
import { getCyxxList, SetDel, setAdd, addSuccess } from './api';
import { useModal } from '/@/components/Modal';
import cyModal from './cyModal.vue';
import { ref } from 'vue';
//注册model
const [registerModal, { openModal, closeModal }] = useModal();
// let isEdit = ref(true)
let router = useRouter();
let route = useRoute();
const { createMessage } = useMessage();
//注册table数据
const { tableContext } = useListPage({
//注册table数据
const { tableContext } = useListPage({
tableProps: {
title: '现场监督-现场采样-采样样点',
api: getCyxxList,
......@@ -44,59 +44,59 @@ const { tableContext } = useListPage({
showIndexColumn: true,
actionColumn: {
width: 150,
fixed: 'right'
fixed: 'right',
},
beforeFetch(params) {
if (route.query.xccyId) {
params.xccyId = route.query.xccyId;
} else {
createMessage.error('内容错误,请返回重试')
createMessage.error('内容错误,请返回重试');
}
},
},
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
//删除事件
async function handleDelete(record) {
await SetDel({ id: record.id })
await addSuccess({xccyId:record.xccyId})
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
//删除事件
async function handleDelete(record) {
await SetDel({ id: record.id });
await addSuccess({ xccyId: record.xccyId });
reload();
}
//查看
function handleLook(record) {
router.push(`/xcjd/xccy/cyList/look?ydxxId=${record.id}`)
}
//新增*编辑事件
function handleAddAndEdit(record) {
}
//查看
function handleLook(record) {
router.push(`/xcjd/xccy/cyList/look?ydxxId=${record.id}`);
}
//新增*编辑事件
function handleAddAndEdit(record) {
openModal(true, {
...record,
xccyId: route.query.xccyId,
ydlx: route.query.ydlx,
})
});
// router.push(`/xcjd/Supervise/LookData/form?wrdkid=${route.query.wrdkid}`)
}
// 提交事件
async function sumbitTable(val) {
}
// 提交事件
async function sumbitTable(val) {
// 获取modal传参 保存到表格里面
val.smtdmc = '四面图(东)'
val.smtnmc = '四面图(南)'
val.smtxmc = '四面图(西)'
val.smtbmc = '四面图(北)'
val.xchczptmc = '现场核查人员自拍图'
val.gpszbtmc = 'GPS设备坐标图'
val.yxtmc = '岩芯图'
val.smtdmc = '四面图(东)';
val.smtnmc = '四面图(南)';
val.smtxmc = '四面图(西)';
val.smtbmc = '四面图(北)';
val.xchczptmc = '现场核查人员自拍图';
val.gpszbtmc = 'GPS设备坐标图';
val.yxtmc = '岩芯图';
await setAdd(val)
await setAdd(val);
if (val.status == 1) {
await addSuccess({xccyId:val.xccyId})
await addSuccess({ xccyId: val.xccyId });
}
closeModal();
reload();
}
closeModal()
reload()
}
/**
* 操作栏
*/
function getTableAction(record) {
/**
* 操作栏
*/
function getTableAction(record) {
// 判断数据来源显示按钮 没有找到控制字段 待优化
if (record.status == 0) {
return [
......@@ -131,8 +131,6 @@ function getTableAction(record) {
},
];
}
}
}
</script>
<style scoped></style>
\ No newline at end of file
<template>
<BasicModal :useWrapper="true" width="60%" @register="registerModal" @ok="ok(1)" v-bind="$attrs" title="选择">
<BasicForm @register="registerForm">
</BasicForm>
<BasicModal :useWrapper="true" @register="registerModal" @ok="ok(1)" v-bind="$attrs" title="选择">
<BasicForm @register="registerForm"> </BasicForm>
<template #centerFooter>
<a-button type="primary" @click="ok(0)">暂存</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicModal, useModalInner } from '/@/components/Modal';
import { defineEmits } from 'vue';
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from './data'
const emit = defineEmits(['sumbitTable'])
import { BasicModal, useModalInner } from '/@/components/Modal';
import { defineEmits } from 'vue';
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from './data';
const emit = defineEmits(['sumbitTable']);
const [registerForm, { resetFields, setFieldsValue, getFieldsValue, updateSchema, validate }] = useForm({
const [registerForm, { resetFields, setFieldsValue, getFieldsValue, updateSchema, validate }] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
......@@ -27,33 +26,32 @@ const [registerForm, { resetFields, setFieldsValue, getFieldsValue, updateSchema
baseRowStyle: { width: '100%' },
//表单布局属性,支持(vertical,horizontal),默认为horizontal
layout: 'horizontal',
});
const [registerModal, { setModalProps, closeModal }] = useModalInner((data) => {
});
const [registerModal, { setModalProps, closeModal }] = useModalInner((data) => {
resetFields();
console.log(data);
setFieldsValue({
...data,
});
})
});
async function ok(type) {
await validate()
let fromData = getFieldsValue()
fromData.status = type
emit('sumbitTable', fromData)
}
defineExpose({
async function ok(type) {
await validate();
let fromData = getFieldsValue();
fromData.status = type;
emit('sumbitTable', fromData);
}
defineExpose({
// save,
})
});
</script>
<style scoped>
/** 时间和数字输入框样式 */
:deep(.ant-input-number) {
/** 时间和数字输入框样式 */
:deep(.ant-input-number) {
width: 100%;
}
}
:deep(.ant-picker) {
:deep(.ant-picker) {
width: 100%;
}
}
</style>
<template>
<!-- <a-spin :spinning="loading"> -->
<div style="width: 90%;margin: 0 auto;">
<div style="width: 99%; margin: 0 auto" class="bg-[#fff] py-2">
<!-- <a-form :model="formState" name="basic" autocomplete="off" @finish="onFinish" @finishFailed="onFinishFailed"> -->
<div style="margin: 25px 0;">
<a-button type="primary" @click="router.back()" style="margin-left: 10px;">返回</a-button>
<a-button type="primary" @click="sumbitAdd" style="margin-left: 10px;"
v-if="route.query.type == 'edit'">填报</a-button>
<div style="margin: 25px 0">
<a-button type="primary" @click="router.back()" style="margin-left: 10px">返回</a-button>
<a-button type="primary" @click="sumbitAdd" style="margin-left: 10px" v-if="route.query.type == 'edit'">填报</a-button>
</div>
<table width="100%" style="width: 100%" border="1" cellspacing="1">
<tbody>
......@@ -59,13 +58,19 @@
<tr class="ant-table-cell ant-table-cell-ellipsis">
<td class="ant-table-cell ant-table-cell-ellipsis bgColor">开发利用现状</td>
<td class="ant-table-cell ant-table-cell-ellipsis" colspan="2">
<a-select style="width:100%" v-model:value="formState.kflyxz" show-search placeholder="请选择开发利用现状"
v-if="route.query.type == 'edit'" :options="[
<a-select
style="width: 100%"
v-model:value="formState.kflyxz"
show-search
placeholder="请选择开发利用现状"
v-if="route.query.type == 'edit'"
:options="[
{ value: '1', label: '未发现开工迹象' },
{ value: '2', label: '有发现开工迹象' },
{ value: '3', label: '正在建设施工' },
{ value: '4', label: '已完成开发建设' },
]">
]"
>
</a-select>
<span v-else>
{{ data.hsList[0].kflyxzmc }}
......@@ -73,9 +78,14 @@
</td>
<td class="ant-table-cell ant-table-cell-ellipsis bgColor">开发利用描述</td>
<td class="ant-table-cell ant-table-cell-ellipsis" colspan="3">
<a-select v-if="route.query.type == 'edit'" style="width:100%" v-model:value="formState.kfxzms"
show-search placeholder="请选择开发利用现状"
:options="formState.kflyxz == '2' ? kfxzmsList2 : formState.kflyxz == '3' ? kfxzmsList3 : []">
<a-select
v-if="route.query.type == 'edit'"
style="width: 100%"
v-model:value="formState.kfxzms"
show-search
placeholder="请选择开发利用现状"
:options="formState.kflyxz == '2' ? kfxzmsList2 : formState.kflyxz == '3' ? kfxzmsList3 : []"
>
</a-select>
<span v-else>
{{ data.hsList[0].kfxzmsmc }}
......@@ -88,9 +98,13 @@
<JUpload v-if="route.query.type == 'edit'" :maxCount="2" @update:value="fcfjUpdataVal" />
<!-- <JUpload :maxCount="2" @update:value="fcfjUpdataVal" /> -->
<template v-else>
<a-button v-if="data.hsList[0].hcfj" preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left:10px" @click="downloadFile(data.hsList[0].hcfj, data.hsList[0].hcfjmc)"
type="primary">
<a-button
v-if="data.hsList[0].hcfj"
preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left: 10px"
@click="downloadFile(data.hsList[0].hcfj, data.hsList[0].hcfjmc)"
type="primary"
>
下载
</a-button>
</template>
......@@ -99,9 +113,13 @@
<td class="ant-table-cell ant-table-cell-ellipsis" colspan="3">
<JUpload v-if="route.query.type == 'edit'" :maxCount="2" @update:value="xcqkUpdataVal" />
<template v-else>
<a-button v-if="data.hsList[0].xcqkfj" preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left:10px"
@click="downloadFile(data.hsList[0].xcqkfj, data.hsList[0].xcqkfjmc)" type="primary">
<a-button
v-if="data.hsList[0].xcqkfj"
preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left: 10px"
@click="downloadFile(data.hsList[0].xcqkfj, data.hsList[0].xcqkfjmc)"
type="primary"
>
下载
</a-button>
</template>
......@@ -120,14 +138,22 @@
</tr>
</tbody>
</table>
<a-table style="margin: 15px 0;" :columns="wgcolumns" :data-source="data?.hsList" bordered>
<a-table style="margin: 15px 0" :columns="wgcolumns" :data-source="data?.hsList" bordered>
<template #bodyCell="{ column, text, record, index }">
<template v-for="col in ['hcfj', 'xcqkfj']" :key="col">
<template v-if="column.dataIndex === col">
<a-button preIcon="ant-design:vertical-align-bottom-outlined" style="margin-left:10px"
<a-button
preIcon="ant-design:vertical-align-bottom-outlined"
style="margin-left: 10px"
v-if="record[col]"
@click="downloadFile(record[col], record[col + 'mc'] ? record[col + 'mc'] : col == 'hcfj' ? '核查附件' : col == 'xcqkfj' ? '现场情况' : '图片')"
type="primary">
@click="
downloadFile(
record[col],
record[col + 'mc'] ? record[col + 'mc'] : col == 'hcfj' ? '核查附件' : col == 'xcqkfj' ? '现场情况' : '图片'
)
"
type="primary"
>
下载
</a-button>
</template>
......@@ -140,28 +166,28 @@
</template>
<script lang="ts" setup>
import { useRoute, useRouter } from 'vue-router';
import { ref } from 'vue';
import { getHsqk, addXchs } from './api';
import { useMessage } from '/@/hooks/web/useMessage';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import { downloadFile } from '/@/utils/common/renderUtils';
const route = useRoute();
const router = useRouter();
const { createMessage } = useMessage();
let data = ref({
hsList: [{ kflyxzmc: '', kfxzmsmc: '', xcqkfj: '', hcfj: '', hcdw: '' }]
})
let loading = ref(true)
const kfxzmsList2 = [
import { useRoute, useRouter } from 'vue-router';
import { ref } from 'vue';
import { getHsqk, addXchs } from './api';
import { useMessage } from '/@/hooks/web/useMessage';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import { downloadFile } from '/@/utils/common/renderUtils';
const route = useRoute();
const router = useRouter();
const { createMessage } = useMessage();
let data = ref({
hsList: [{ kflyxzmc: '', kfxzmsmc: '', xcqkfj: '', hcfj: '', hcdw: '' }],
});
let loading = ref(true);
const kfxzmsList2 = [
{ value: '1', label: 'A、风险管控,修复项目管控' },
{ value: '2', label: 'B、与风险管控,修复无关的项目建设' },
]
const kfxzmsList3 = [
];
const kfxzmsList3 = [
{ value: '3', label: 'A、风险管控,修复项目修复' },
{ value: '4', label: 'B、与风险管控,修复无关的项目建设' },
]
const formState = ref({
];
const formState = ref({
kflyxz: '',
kfxzms: '',
hcfj: '',
......@@ -169,13 +195,12 @@ const formState = ref({
xcqkfj: '',
xcqkfjmc: '现场情况',
hcdw: '',
wrdkid: route.query.wrdkid
});
const wgcolumns = [
wrdkid: route.query.wrdkid,
});
const wgcolumns = [
{
title: '开发现状',
dataIndex: 'kflyxzmc',
},
{
title: '开发现状描述',
......@@ -197,14 +222,14 @@ const wgcolumns = [
title: '核查时间',
dataIndex: 'createTsamp',
},
];
function fcfjUpdataVal(val) {
formState.value.hcfj = val
}
function xcqkUpdataVal(val) {
formState.value.xcqkfj = val
}
async function sumbitAdd() {
];
function fcfjUpdataVal(val) {
formState.value.hcfj = val;
}
function xcqkUpdataVal(val) {
formState.value.xcqkfj = val;
}
async function sumbitAdd() {
// 添加必填条件
// if (!formState.value.kflyxz) {
// createMessage.info('请选择开发利用现状')
......@@ -215,37 +240,38 @@ async function sumbitAdd() {
// createMessage.info('请选择开发利用现状描述')
// return false
// }
await addXchs(formState.value)
router.back()
await addXchs(formState.value);
router.back();
// }
// }
}
async function init() {
}
async function init() {
// console.log(route.query.wrdkid);
// 拿到路由传参 请求接口
let result = await getHsqk({ wrdkid: route.query.wrdkid })
data.value = result //响应式赋值
loading.value = false //加载中状态
}
init()
defineProps({
let result = await getHsqk({ wrdkid: route.query.wrdkid });
data.value = result; //响应式赋值
loading.value = false; //加载中状态
}
init();
defineProps({
data: Object,
})
});
</script>
<style scoped>
table {
table {
border-collapse: collapse;
border: 1px #dfe6ec solid
}
border: 1px #dfe6ec solid;
}
tbody tr td {
tbody tr td {
padding: 6px;
height: 40px;
}
}
.bgColor {
.bgColor {
background-color: rgba(244, 247, 249, 0.8);
text-align: center;
width: 10%;
}</style>
\ No newline at end of file
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论