Commit 3f85c9bc by WF1020

Merge branch 'settle-test-20230110' of http://114.115.138.98:8900/fukai/vue-gjjs…

Merge branch 'settle-test-20230110' of http://114.115.138.98:8900/fukai/vue-gjjs into settle-test-20230110
parents feceba9b 3c16dddb
......@@ -20,8 +20,8 @@ export function edit(data) {
return Api.post("/service/tdh/edit", data)
}
export function deleteById(data) {
return Api.post(`/service/tdh/deleteById`, data)
export function deleteById(inr) {
return Api.post(`/service/tdh/deleteById?inr=${inr}`)
}
export function queryYearList(data) {
......
......@@ -18,6 +18,10 @@ export const Pattern = {
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"ver": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
"cod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
......
......@@ -33,11 +33,7 @@
<c-input v-model="model.pri" placeholder="请输入优先级"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="版本号" prop="ver">
<c-input v-model="model.ver" placeholder="请输入版本号"> </c-input>
</el-form-item>
</c-col>
</c-col>
</div>
</template>
......
......@@ -90,8 +90,8 @@ export default {
created() {
if (this.type !== "add") {
const inr = this.$route.params.inr;
const data = { inr: inr };
queryById(data).then((res) => {
queryById(inr).then((res) => {
if (res.inr) {
this.model = res;
} else {
......@@ -139,9 +139,10 @@ export default {
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const data = { inr: this.model.inr };
deleteById(data)
const inr = this.$route.params.inr;
deleteById(inr)
.then((res) => {
this.$message.success("删除成功!");
this.goBack(true);
......@@ -163,6 +164,7 @@ export default {
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfapf", params: { update } });
},
},
};
......
......@@ -47,7 +47,7 @@
<c-col :span="24">
<c-col :span="12" style="text-align: left">
<el-button type="primary" size="small" @click="actAdd">新增</el-button>
<el-button type="primary" size="small" @click="apfAdd">新增</el-button>
</c-col>
<c-col :span="12" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button>
......@@ -63,8 +63,8 @@
<c-col :span="24">
<c-paging-table
:data="actData"
:columns="actColumns"
:data="apfData"
:columns="apfColumns"
:pageNumber="model.pageNum"
:pageSize="model.pageSize"
:total="model.total"
......@@ -127,8 +127,8 @@ export default {
inject: ["root"],
data() {
return {
actData: [],
actColumns: [
apfData: [],
apfColumns: [
{ label: '样式设置', prop: 'cod', width: 'auto' },
{ label: '描述', prop: 'cod', width: 'auto' },
],
......@@ -138,6 +138,8 @@ export default {
},
activated() {
const { update } = this.$route.params
console.log("================================")
console.log(update);
if (update) {
this.onInfapfSearch()
}
......@@ -161,7 +163,7 @@ export default {
* totalPage: 0
*/
const list = res.list
this.actData = list
this.apfData = list
this.model.pageNum = res.pageNumber
this.model.pageSize = res.pageSize
this.model.total = res.total
......@@ -172,6 +174,9 @@ export default {
this.model.pageSize = pageSize
this.onInfapfSearch()
},
apftypeChange(val) {
this.model.apftyp = val;
},
getCodesByKey(key) {
return codes[key] ?? [];
},
......@@ -179,6 +184,7 @@ export default {
this.$router.push(`/statics/dbaapf`)
},
apfInfo(index, row) {
this.$router.push(`/statics/dbiapf/${row.inr}`)
},
apfEdit(index, row) {
......
......@@ -25,7 +25,7 @@
import Infsea from "./Infsea";
export default {
name: "StaticsInfact",
name: "StaticsInfapf",
components: {
"m-infsea": Infsea,
},
......
......@@ -21,7 +21,7 @@ export default class Swm {
export const Pattern = {
"fmt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
{ "max": 10, "message": "最大长度1个字符", "trigger": "blur" }
],
"mt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......
......@@ -14,7 +14,7 @@ export default class Tdh {
export const Pattern = {
"dat": [
{ "required": true, "message": "必输项", "type": "date", "trigger": "blur" },
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
],
"calendar": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......
......@@ -103,6 +103,7 @@
commitAdd() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
console.log("123")
add(this.model)
.then((res) => {
this.$message.success("保存成功!")
......@@ -112,6 +113,7 @@
this.$message.error("保存失败!");
});
} else {
console.log("失败")
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
......@@ -139,8 +141,7 @@
type: "warning",
})
.then(() => {
let data = {"inr":this.model.inr}
deleteById(data)
deleteById(this.model.inr)
.then((res) => {
this.$message.success("删除成功!");
this.goBack(true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment