xy 1 year ago
parent 45912514c0
commit 235ef3d1fe

@ -4,10 +4,10 @@ NODE_ENV = production
ENV = 'staging'
# base api
VUE_APP_BASE_API=http://wuxiwuye.ali251.langye.net/
VUE_APP_UPLOAD_API=http://wuxiwuye.ali251.langye.net/api/admin/upload-file
VUE_APP_PREVIEW=//view.langye.net:8012/onlinePreview
#VUE_APP_BASE_API=http://wuxiwuye.ali251.langye.net/
#VUE_APP_UPLOAD_API=http://wuxiwuye.ali251.langye.net/api/admin/upload-file
#VUE_APP_PREVIEW=//view.langye.net:8012/onlinePreview
# base api
#VUE_APP_BASE_API=http://192.168.221.31:9001/
#VUE_APP_UPLOAD_API=http://192.168.221.31:9001/api/admin/upload-file
#VUE_APP_PREVIEW=http://192.168.221.31:8012/onlinePreview
VUE_APP_BASE_API=http://192.168.221.31:9001/
VUE_APP_UPLOAD_API=http://192.168.221.31:9001/api/admin/upload-file
VUE_APP_PREVIEW=http://192.168.221.31:8012/onlinePreview

@ -81,7 +81,8 @@ export default {
}
}
console.log(this.map)
this.map = Object.assign(this.map, {})
this.$forceUpdate()
}
},
immediate: true

@ -144,9 +144,9 @@ export class CreateDialog {
},
props: {
model: that.form,
labelWidth: "80px",
labelWidth: "100px",
rules: that.rules,
labelPosition: "right",
labelPosition: "top",
size: "small",
},
},

@ -10,6 +10,7 @@ export default {
render(h) {
let dialog = new CreateDialog(this,[
{
show: true,
key: 'chuzhileixing',
label: '处置类型',
render: h('el-select', {
@ -38,7 +39,7 @@ export default {
}))
}
],{
width: "650px"
width: "80vw"
})
return dialog.render()
},
@ -242,8 +243,10 @@ export default {
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

@ -30,7 +30,7 @@ export default {
render: h('span', this.row.yongtu)
}
],{
width: "650px"
width: "80vw"
})
return dialog.render()
},
@ -244,8 +244,10 @@ export default {
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

@ -11,14 +11,249 @@ export default {
tableName: String,
},
render(h) {
let houseDialog = new CreateDialog(this)
const _this = this;
let houseDialog = new CreateDialog(this, [
{
show: true,
key: "guanliantudizhengquanzheng",
label: "关联土地证权证",
render: h("div",[
h("el-button", {
props: {
type: "primary",
size: "small"
},
on: {
['click']: _ => {
_this.landDialog = true;
}
}
},'选择土地'),
h("br"),
h("Tag",{
style: {
display: _this.selectLand?.name ? "inline-block" : "none"
},
props: {
color: "primary",
closable: true
},
on: {
["on-close"]: _ => {
_this.selectLand = {};
_this.$refs['houseLinkTable'].setCurrentRow();
}
}
},_this.selectLand?.name)
]),
},
],{
width: '80vw'
})
return (
<div>
{
houseDialog.render()
}
return h('div',[
houseDialog.render()
])
<el-drawer title="土地列表"
visible={this.landDialog}
size="64%"
on={{
['update:visible']: (val) => this.landDialog = val,
}}>
<div style="padding: 0 10px;">
<xy-table
ref="houseLinkTable"
table-item={
[
{
"prop": "id",
"width": 60,
"label": "序号"
},
{
"prop": "tudiquanshuren",
"label": "土地权属人",
"width": 0,
"align": "left"
},
{
"prop": "area",
"label": "区域",
"width": 0,
"align": "center"
},
{
"prop": "name",
"label": "地块名称",
"width": 0,
"align": "left",
"fixed": "left"
},
{
"prop": "tudizhenghao",
"label": "土地证号",
"width": 0,
"align": "left"
},
{
"prop": "zuoluo",
"label": "坐落",
"width": 0,
"align": "left"
},
{
"prop": "zichanweizhi",
"label": "资产位置",
"width": 0,
"align": "center"
},
{
"prop": "quanliren",
"label": "证载“权利人”",
"width": 0,
"align": "left"
},
{
"prop": "gongyouqingkuang",
"label": "共有情况",
"width": 0,
"align": "center"
},
{
"prop": "shiyongnianxian",
"label": "使用年限(年)",
"width": 0,
"align": "center"
},
{
"prop": "xianzhuang",
"label": "现状",
"width": 0,
"align": "center"
},
{
"prop": "yongtu",
"label": "用途",
"width": 0,
"align": "left"
},
{
"prop": "shiyongquanleixing",
"label": "使用权类型",
"width": 0,
"align": "center"
},
{
"prop": "lingzhengriqi",
"label": "领证日期",
"width": 0,
"align": "center"
},
{
"prop": "zhongzhiriqi",
"label": "终止日期",
"width": 0,
"align": "center"
},
{
"prop": "dengjimianji",
"label": "登记面积",
"width": 0,
"align": "center"
},
{
"prop": "shijimianji",
"label": "实际面积",
"width": 0,
"align": "center"
},
{
"label": "不符情况",
"width": 0
},
{
"prop": "bufuyuanyin",
"label": "不符原因",
"width": 0,
"align": "center"
},
{
"prop": "ruzhangshijian",
"label": "入账时间",
"width": 0,
"align": "center"
},
{
"prop": "zhangmianyuanzhi",
"label": "账面原值",
"width": 0,
"align": "center"
},
{
"prop": "tudidengji",
"label": "土地等级",
"width": 0,
"align": "center"
},
{
"prop": "tudishuidanjia",
"label": "土地税单价",
"width": 0,
"align": "center"
},
{
"prop": "tudishui",
"label": "土地税",
"width": 0,
"align": "center"
},
{
"prop": "tudishuijiaonazhuti",
"label": "土地税缴纳主体",
"width": 0,
"align": "center"
},
{
"prop": "jiaoshuijine",
"label": "缴税金额",
"width": 0,
"align": "center"
}
]
}
action={this.index}
req-opt={{
table_name: "lands"
}}
on={{
['loaded']: _ => {
if (this.selectLand.id) {
this.$refs['houseLinkTable'].setCurrentRow(
this.$refs['houseLinkTable'].getListData().find(row => row.id === this.selectLand.id)
);
}
},
['row-click']: ({ row }) => {
if (row.id === this.selectLand.id) {
this.selectLand = {};
this.$refs['houseLinkTable'].setCurrentRow();
} else {
this.selectLand = row;
}
},
}}
></xy-table>
</div>
</el-drawer>
</div>
)
},
data() {
return {
selectLand: {},
columns: 1,
id: "",
type: "add",
@ -27,9 +262,12 @@ export default {
originalForm: {},
rules: {},
file: {},
landDialog: false,
};
},
methods: {
index,
init() {
for (let key in this.form) {
if (this.form[key] instanceof Array) {
@ -90,6 +328,9 @@ export default {
});
this.form = Object.assign({}, this.form);
this.originalForm = deepCopy(res);
if (res.land_id_lands_id_relation) {
this.selectLand = res.land_id_lands_id_relation;
}
},
submit() {
@ -270,6 +511,7 @@ export default {
this.id = "";
this.type = "";
this.init();
this.$refs['houseLinkTable']?.setCurrentRow();
this.$refs["elForm"].clearValidate();
delete this.form.id;
for (let key in this.file) {
@ -277,6 +519,19 @@ export default {
}
}
},
selectLand (newVal) {
if (newVal && newVal.id) {
this.form.land_id = newVal.id;
this.form.zichanweizhi = newVal.zichanweizhi;
this.form.quanzhenghao = newVal.tudizhenghao;
this.form = Object.assign({}, this.form);
} else {
this.form.land_id = "";
this.form.zichanweizhi = "";
this.form.quanzhenghao = "";
this.form = Object.assign({}, this.form);
}
}
},
};
</script>
@ -299,8 +554,14 @@ export default {
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
::v-deep .el-table__body tr.current-row > td.el-table__cell {
background: $primaryColor;
color: #fff;
}
</style>

@ -139,7 +139,9 @@ export default {
},
}),
},
]);
],{
width: "80vw"
});
return dialog.render();
},
data() {
@ -218,6 +220,12 @@ export default {
this.form = Object.assign({}, this.form);
this.originalForm = deepCopy(res);
});
this.$refs['houseTable'].getListData().forEach(row => {
if (this.originalForm.id_houses_land_id_relation.find(i => i.id === row.id)) {
this.$refs['houseTable'].toggleRowSelection(row, true);
}
})
},
submit() {
@ -335,7 +343,14 @@ export default {
});
if (this.$refs["houseTable"].getSelection() && this.$refs["houseTable"]?.getSelection()?.length > 0) {
promiseAll.push(
...this.$refs["houseTable"].getSelection().map(i => save(Object.assign(i, { table_name: 'houses',land_id: this.id, quanzhenghao: copyForm.tudizhenghao, zichanweizhi: copyForm.zichanweizhi })))
...this.$refs["houseTable"].getSelection().map(i => {
for (let key in i) {
if (/_relation/g.test(key)) {
delete i[key]
}
}
return save(Object.assign(i, { table_name: 'houses',land_id: this.id, quanzhenghao: copyForm.tudizhenghao, zichanweizhi: copyForm.zichanweizhi }))
})
);
}
this.originalForm.id_houses_land_id_relation.forEach(item => {
@ -421,7 +436,8 @@ export default {
this.type = "";
this.init();
this.$refs["elForm"].clearValidate();
this.$refs["houseTable"].setCurrentRow();
this.$refs["houseTable"].getTableData(true);
this.$refs["houseTable"].clearSelection();
delete this.form.id;
for (let key in this.file) {
this.file[key] = [];
@ -450,8 +466,10 @@ export default {
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

@ -316,8 +316,10 @@ export default {
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

@ -447,12 +447,16 @@ export default {
<div>
{
row.land?.map(i => (
<Tag color="green">{ i.name }</Tag>
<div>
<Tag color="green">{ i.name }</Tag>
</div>
))
}
{
row.houses?.map(i => (
<Tag color="blue">{ i.name }</Tag>
<div>
<Tag color="blue">{ i.name }</Tag>
</div>
))
}
</div>

@ -47,6 +47,11 @@
v-model="select.filter[0].value"
style="width: 150px; margin-left: 10px"
placeholder="请填写关键词"
@input="e => {
if (!select.filter[0].key) {
select.keyword = e
}
}"
/>
</template>
<template
@ -273,6 +278,7 @@
:table-item="table"
:btn-to-more="true"
:more-auths="['edit','delete','picture','file']"
@loaded="adjustAlignment"
@detail="
(row) => {
$router.push({
@ -394,8 +400,10 @@ export default {
},
data() {
return {
firstAdjustTable: true,
op,
select: {
keyword: "",
table_name: "",
filter: [
{
@ -751,6 +759,39 @@ export default {
formatter: (row, column, cellValue, index) => (this.$refs['xyTable'].selectOpt.page - 1) * this.$refs['xyTable'].selectOpt.page_size + index + 1
})
},
adjustAlignment () {
if (this.firstAdjustTable) {
const data = this.$refs['xyTable'].getListData();
if (data.length < 2) return;
try {
this.form.filter(i => i.list_show).forEach((i) => {
let maxLength = -Infinity;
let minLength = Infinity;
let numberLength = 0;
let temp = 0;
while (temp < data.length) {
maxLength = Math.max(maxLength, data[temp][i.field]?.length??0);
minLength = Math.min(minLength, data[temp][i.field]?.length??0);
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp && !i._params) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {
this.table.find(a => a.prop === i.field).align = 'left';
}
})
console.log(this.table)
} catch (e) {
console.error(e)
}
this.$nextTick(() => {
this.$refs['xyTable'].doLayout();
this.firstAdjustTable = false;
})
}
},
toHistory(row) {
this.$refs['history'].setRow(row);

@ -47,6 +47,11 @@
v-model="select.filter[0].value"
style="width: 150px; margin-left: 10px"
placeholder="请填写关键词"
@input="e => {
if (!select.filter[0].key) {
select.keyword = e
}
}"
/>
</template>
<template
@ -249,6 +254,7 @@
:table-item="table"
:btn-to-more="true"
:more-auths="['edit','delete','picture','file']"
@loaded="adjustAlignment"
@detail="
(row) => {
$router.push({
@ -374,6 +380,7 @@ export default {
},
data() {
return {
firstAdjustTable: true,
op,
select: {
table_name: "",
@ -740,6 +747,39 @@ export default {
})
},
adjustAlignment () {
if (this.firstAdjustTable) {
const data = this.$refs['xyTable'].getListData();
if (data.length < 2) return;
try {
this.form.filter(i => i.list_show).forEach((i) => {
let maxLength = -Infinity;
let minLength = Infinity;
let numberLength = 0;
let temp = 0;
while (temp < data.length) {
maxLength = Math.max(maxLength, data[temp][i.field]?.length??0);
minLength = Math.min(minLength, data[temp][i.field]?.length??0);
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp && !i._params) {
this.table.find(a => a.prop === i.field).align = 'right';
}
else if (Math.abs(maxLength - minLength) > 4) {
this.table.find(a => a.prop === i.field).align = 'left';
}
})
console.log(this.table)
} catch (e) {
console.error(e)
}
this.$nextTick(() => {
this.$refs['xyTable'].doLayout();
this.firstAdjustTable = false;
})
}
},
toHistory (row) {
this.$refs['history'].setRow(row);

@ -49,7 +49,7 @@
<div class="el-descriptions__header el-descriptions__title">
{{ item.title }}
</div>
<xy-table size="mini" :height="300" :is-page="false" :list="item.value" :table-item="item.field"></xy-table>
<xy-table ref="xyTable" size="mini" :height="300" :is-page="false" :list="item.value" :table-item="item.field"></xy-table>
</el-card>
</el-col>
</el-row>
@ -364,9 +364,10 @@ export default {
);
});
table.unshift({
type: "index",
prop: "id",
width: 60,
label: "序号",
formatter: (row, column, cellValue, index) => (this.$refs['xyTable'].selectOpt.page - 1) * this.$refs['xyTable'].selectOpt.page_size + index + 1
});
return table;

@ -49,7 +49,7 @@
<div class="el-descriptions__header el-descriptions__title">
{{ item.title }}
</div>
<xy-table size="mini" :height="300" :is-page="false" :list="item.value" :table-item="item.field"></xy-table>
<xy-table ref="xyTable" size="mini" :height="300" :is-page="false" :list="item.value" :table-item="item.field"></xy-table>
</el-card>
</el-col>
</el-row>
@ -361,9 +361,11 @@ export default {
)
})
table.unshift({
type: 'index',
prop: 'id',
width: 60,
label: '序号'
label: '序号',
formatter: (row, column, cellValue, index) => (this.$refs['xyTable'].selectOpt.page - 1) * this.$refs['xyTable'].selectOpt.page_size + index + 1
})
return table

@ -51,9 +51,9 @@ export default {
class: "form-body",
props: {
model: this.form,
labelWidth: "80px",
labelWidth: "100px",
rules: this.rules,
labelPosition: "right",
labelPosition: "top",
size: "small",
},
},
@ -92,35 +92,13 @@ export default {
h(
"el-input",
{
attrs: {
placeholder: i.help || `请选择${i.name}`,
},
props: {
readonly: true,
value:
(this.pickModalText[i.field]) || (i._relations.link_relation ===
"newHasOne" ||
i._relations.link_relation === "hasOne"
? this.originalForm[
i._relations.link_with_name
]?.name ||
this.originalForm[
i._relations.link_with_name
]?.mingcheng ||
this.originalForm[
i._relations.link_with_name
]?.no ||
this.originalForm[
i._relations.link_with_name
]?.id || this.form[i.field]
: this.originalForm[
i._relations.link_with_name
]
?.map(
(j) =>
j[
i._relations
.custom_form_field
]
)
?.toString()),
(this.pickModalText[i.field]),
},
on: {
['focus']:e => {
@ -289,6 +267,8 @@ export default {
["confirm"]: ({ field, value, text }) => {
this.form[field] = value;
this.pickModalText[field] = text;
this.pickModalText = Object.assign({},this.pickModalText)
console.log(this.pickModalText)
},
},
}),
@ -485,6 +465,22 @@ export default {
}
if (i && (i._relations?.link_relation === 'newHasMany' || i._relations?.link_relation === 'hasMany')) {
this.form[i.field] = res[i._relations.link_with_name].map(j => j[i._relations.custom_form_field])
this.pickModalText[i.field] = res[i._relations.link_with_name]?.map((j) => j[i._relations.custom_form_field])?.toString()
}
if (i && (i._relations?.link_relation === 'newHasOne' || i._relations?.link_relation === 'hasOne')) {
this.pickModalText[i.field] = (res[
i._relations.link_with_name
]?.name ||
res[
i._relations.link_with_name
]?.mingcheng ||
res[
i._relations.link_with_name
]?.no ||
res[
i._relations.link_with_name
]?.id || res[i.field])
}
});
@ -697,8 +693,10 @@ export default {
text-decoration: underline;
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

@ -1,6 +1,6 @@
<template>
<div>
<el-dialog :visible.sync="dialogVisible">
<el-dialog title="请选择" :visible.sync="dialogVisible">
<template>
<div class="select">
<Select
@ -27,6 +27,11 @@
v-model="select.filter[0].value"
style="width: 150px; margin-left: 10px"
placeholder="请填写关键词"
@input="e => {
if (!select.filter[0].key) {
select.keyword = e
}
}"
/>
</template>
<template v-else>
@ -54,6 +59,7 @@
>
</div>
<xy-table
:isHandlerKey="false"
:is-first-req="false"
ref="table"
:row-key="(row) => row.id"
@ -105,6 +111,7 @@ export default {
tempRow: {},
dialogVisible: false,
select: {
keyword: "",
table_name: "",
table_id: "",
filter: [
@ -219,8 +226,9 @@ export default {
);
});
this.columns.unshift({
type: "index",
prop: "id",
width: 50,
formatter: (row, column, cellValue, index) => (this.$refs['xyTable'].selectOpt.page - 1) * this.$refs['xyTable'].selectOpt.page_size + index + 1
});
if (this.linkType === "hasMany" || this.linkType === "newHasMany") {
@ -234,20 +242,30 @@ export default {
adjustAlignment () {
if (this.firstAdjustTable) {
const data = this.$refs['table'].getListData();
if (data.length === 0) return;
this.fields.forEach((i) => {
let lengthTemp = data[0][i.field]?.length??0;
for (let j = 0;j < data.length;j++) {
if (/^-?\d+\.\d+/.test(data[j][i.field])) {
if (data.length < 2) return;
try {
this.fields.filter(i => i.list_show).forEach((i) => {
let maxLength = -Infinity;
let minLength = Infinity;
let numberLength = 0;
let temp = 0;
while (temp < data.length) {
maxLength = Math.max(maxLength, data[temp][i.field]?.length??0);
minLength = Math.min(minLength, data[temp][i.field]?.length??0);
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp) {
this.columns.find(a => a.prop === i.field).align = 'right';
return
}
if (Math.abs(lengthTemp - (data[j][i.field]?.length)??0) > 4) {
else if (Math.abs(maxLength - minLength) > 4) {
this.columns.find(a => a.prop === i.field).align = 'left';
return
}
}
})
})
console.log(this.columns)
} catch (e) {
console.error(e)
}
this.$nextTick(() => {
this.$refs['table'].doLayout();
this.firstAdjustTable = false;
@ -256,17 +274,28 @@ export default {
},
selectRows() {
this.originalRowIds.forEach((id) => {
let data = this.$refs["table"].getListData();
if (this.linkType === 'hasMany' || this.linkType === 'newHasMany') {
this.originalRowIds.forEach((id) => {
let data = this.$refs["table"].getListData();
let row = data.find((i) => i.id === id);
if (row) {
this.$refs["table"].toggleRowSelection(row);
}
});
let row = data.find((i) => i.id === id);
if (row) {
this.$refs["table"].toggleRowSelection(row);
}
});
} else {
this.$refs['table'].setCurrentRow(
this.$refs['table'].getListData().find(i => i.id === this.originalRows?.id)
)
}
},
rowPick({ row }) {
this.tempRow = row;
if (JSON.stringify(this.tempRow) === JSON.stringify(row)) {
this.tempRow = {};
this.$refs['table'].setCurrentRow();
} else {
this.tempRow = row;
}
},
selectBk(selections, row) {
if (!selections.find((i) => i.id === row.id)) {
@ -295,6 +324,11 @@ export default {
computed: {},
watch: {
async linkTableName(newVal) {
this.$nextTick(() => {
if (this.$refs['table']) {
this.$refs['table'].loading = true;
}
})
await this.getDataTableName();
await this.getColumns();
await this.$refs["table"].getTableData();
@ -308,9 +342,11 @@ export default {
}
},
originalRows(newVal) {
this.originalRowIds = newVal.map((i) => i[this.field]);
if (newVal instanceof Array) {
this.originalRowIds = newVal.map((i) => i[this.field]);
}
this.selectRows();
//this.selectRows();
},
},
};
@ -320,4 +356,8 @@ export default {
.select {
margin-bottom: 10px;
}
::v-deep .el-table__body tr.current-row > td.el-table__cell {
background: $primaryColor;
color: #fff;
}
</style>

@ -434,8 +434,8 @@ export default {
) || relation.find(
(j) => j.local_key === i.field
);
if (i.select_item && typeof i.select_item === "object") {
let keys = Object.keys(i.select_item);
if (i.select_item && typeof i.select_item === 'object') {
let keys = Object.keys(i.select_item)
if (keys.length > 0) {
i._params = keys.map((key) => {
return {
@ -445,6 +445,9 @@ export default {
: i.select_item[key],
};
});
//select,radio
i.edit_input = 'radio'
}
}
if (i.edit_input === 'file' || i.edit_input === 'files') {

@ -47,7 +47,7 @@ export default {
])
}
],{
width: "1000px"
width: "80vw"
})
return (
@ -613,8 +613,10 @@ export default {
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

@ -51,7 +51,7 @@ export default {
})
}
],{
width: "650px"
width: "80vw"
})
return dialog.render()
},
@ -249,8 +249,10 @@ export default {
}
.form-body {
padding-right: 20px;
display: grid;
grid-gap: 10px;
grid-row-gap: 10px;
grid-column-gap: 40px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

Loading…
Cancel
Save