Commit fcc312f7 by xue_wengang

运控代码迁移

parent 427a0dcb
...@@ -11,6 +11,49 @@ export default { ...@@ -11,6 +11,49 @@ export default {
method: "post" method: "post"
}); });
}, },
/*移动警务*/
getYdjwList(params) {
return request({
url: url.rzURL + "/aapydgl/list",
data: params,
method: "post"
});
},
insertYdjw(params) {
return request({
url: url.rzURL + "/aapydgl/insert",
data: params,
method: "post"
});
},
updateYdjw(params) {
return request({
url: url.rzURL + "/aapydgl/update",
data: params,
method: "post"
});
},
deleteYdjw(params) {
return request({
url: url.rzURL + "/aapydgl/delete",
data: params,
method: "post"
});
},
queryByIdJw(params) {
return request({
url: url.rzURL + "/aapydgl/queryById",
data: params,
method: "post"
});
},
fsycgl(params) {
return request({
url: url.rzURL + "/aapydgl/fsycgl",
data: params,
method: "post"
});
},
/*code*/ /*code*/
axiosCode(type) { axiosCode(type) {
return request({ return request({
......
<template>
<div class="tableCon">
<el-table :data="tableData"
element-loading-text="加载中..."
tooltip-effect="dark"
:header-cell-style="{ textAlign: 'center',background: '#FAFAFA' }"
:cell-style="{ textAlign: 'center' }"
style="width: 100%"
border
@sort-change='sortTableFun'
v-loading="columObj.loading">
<!-- 选择框是否开启,selectable控制是否单行禁用 -->
<el-table-column v-if="columObj.selection"
type="selection"
:selectable="columObj.selectable">
</el-table-column>
<!-- 普通列 -->
<el-table-column v-for="(column,columIndex) in columObj.columnData"
:key="columIndex"
:prop="column.prop"
:label="column.label"
:width="column.width"
:fixed="column.fixed"
:align="column.align || 'center'"
:sortable="column.sortable"
:show-overflow-tooltip="column.showToolTip"
:index="columIndex">
<template slot-scope="{row,$index}">
<!-- 操作按钮 -->
<!-- 基础操作 -->
<template v-if="column.type=='basic'">
<span v-for="(operations, index) in column.operation"
:key="index">
<el-button :icon="operations.icon"
:type="operations.type"
@click="rowOperation(row,index,operations.option)"
:style="{color:operations.color}"
size="mini">{{ operations.label }}</el-button>
</span>
</template>
<!-- 操作 -->
<template v-if="column.type=='basicDetail'">
<span v-for="(operations, index) in column.operation"
:key="index">
<el-button :icon="operations.icon"
:type="operations.type"
@click="rowOperation(row,index,operations.option)"
:style="{color:operations.color}"
size="mini">{{ operations.label }}</el-button>
</span>
</template>
<!-- 默认展示 -->
<span v-if="column.text && column.editRow != $index">
{{ (row[column.prop] + '') || '--' }}
</span>
<!-- 大文本内容展示 -->
<template v-if="column.textarea && column.editRow != $index">
<span v-if="(row[column.prop]+'').length >= 50 && !row.expandContent">
{{ row[column.prop].substring(0, 50) }}...
</span>
<span v-if="(row[column.prop]+'').length < 50 || row.expandContent">
{{ (row[column.prop] + '') || '--' }}
</span>
<el-button-group v-if="(row[column.prop]+'').length >= 50"
style="float: right">
<el-button v-if="!row.expandContent"
type="text"
size="mini"
@click="row.expandContent = true">展开
</el-button>
<el-button v-if="row.expandContent"
type="text"
size="mini"
@click="row.expandContent = false">收起
</el-button>
</el-button-group>
</template>
<!-- 按钮展示 -->
<span v-if="column.edit && column.editRow != $index"
@click="rowBtn(row,column.prop)"
style="cursor: pointer;color: #409EFF;">
{{ (row[column.prop] + '') || '--' }}
</span>
<!-- 部分按钮展示 -->
<span v-if="column.editPart && column.editRow != $index">
<span @click="row.name&&row.name!=='合计'&&row.unitgrade>4&&row.ifslgzd !='true'? rowBtn(row,column.prop):''"
:style="row.name&&row.name!=='合计'&&row.unitgrade>4&&row.ifslgzd !='true'? 'cursor: pointer;color: #409EFF;':''"> {{
(row[column.prop] + '') || '--'
}}</span>
<span></span>
</span>
<!-- 有颜色字体 -->
<span v-if="column.colorText ">
<template>
<span v-if="row.sbzt=='0'"
class="s_runn"> {{ ( '开启') || '--' }}</span>
<span v-if="row.sbzt=='1'"
class="s_stop"> {{ ( '关闭') || '--' }}</span>
</template>
</span>
<!-- 状态对象展示 -->
<span v-if="column.status
&&
row[column.prop]">{{ row[column.prop].msg }}</span>
<!-- 自定义内容 -->
<span v-if="column.ownDefined">{{ column.ownDefinedReturn(row, $index) }}</span>
</template>
<!-- 嵌套表格 -->
<template v-if="column.option&&column.option.length>0">
<el-table-column v-for="inner in column.option"
:key="inner.label"
:label="inner.label"
:width="inner.width"
:show-overflow-tooltip="true">
<template slot-scope="{row}">
<span v-if="inner.edit"
@click="rowBtn(row,inner.prop)"
style="cursor: pointer;color: #409EFF;;">
{{ (row[inner.prop] + '') || '--' }}
</span>
<span v-else>
{{ (row[inner.prop] + '') || '--' }}
</span>
</template>
</el-table-column>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="page_div"
:style="{textAlign: 'right'}">
<el-pagination v-if="columObj.pagination!='noPage'"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageObj.pageData.page"
:page-sizes="[10, 15, 20, 30,50]"
:page-size="pageObj.pageData.size"
background
layout="sizes,prev, pager, next,jumper"
:total="pageObj.total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
props: {
tableData: {
type: Array,
required: true
},
columObj: {
type: Object,
required: true
},
pageObj: {
type: Object,
required: true
}
},
methods: {
sortTableFun (column) {
this.$emit("sortTableFun", column)
},
// 详情按钮
rowBtn (row, $index) {
this.$emit("rowBtn", row, $index)
},
// 行操作
rowOperation (row, $index, now) {
this.$emit("rowOperation", row, $index, now)
},
// 条数变化
handleSizeChange (e) {
this.$emit('handleSizeChange', e);
},
// 页码变化
handleCurrentChange (e) {
this.$emit('handleCurrentChange', e);
},
// 导出数据
exportData () {
this.$emit('exportData', '')
}
},
}
</script>
<style lang="scss" scoped>
.table-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
.table-info-left {
span {
display: inline-block;
font-style: normal;
}
.table-title {
font-weight: 500;
font-size: 18px;
line-height: 24px;
color: #383838;
margin-right: 20px;
}
.table-total {
font-size: 16px;
color: #777777;
}
.el-button {
width: 90px;
// height: 32px;
padding: 10px 0;
box-sizing: border-box;
}
.table-info {
font-weight: 500;
font-size: 18px;
line-height: 24px;
color: #383838;
margin-left: 20px;
}
}
}
.page_div {
margin-top: 20px;
text-align: right;
height: 48px;
line-height: 48px;
}
.el-pagination {
text-align: right !important;
padding-right: 24px;
}
.s_stop {
display: inline-block;
padding: 2px 4px;
border-radius: 5px;
background: #888;
color: #000;
}
.s_runn {
display: inline-block;
padding: 2px 4px;
border-radius: 5px;
color: #fff;
background: green;
}
</style>
\ No newline at end of file
<template>
<div>
<el-form :model="formData"
:rules="rules"
ref="ruleForm"
:label-width="labelWidth"
:label-position="labelPosition">
<el-form-item :class="{'formItem3':isActive}"
v-for="item in formConfig"
:label="item.label"
:prop="item.prop"
size="small"
:key="item.prop">
<!-- 输入框 -->
<el-input v-if="item.type === 'input'"
size="small"
placeholder="请输入"
v-model.trim="formData[item.prop]"
:disabled="item.disabled"
:style="{ width: item.width }"
@change="item.change && item.change(formData[item.prop])"></el-input>
<el-input-number v-if="item.type === 'inputNum'"
size="small"
placeholder="请输入" :min="0"
v-model.trim="formData[item.prop]"
:disabled="item.disabled"
:style="{ width: item.width }"
@change="item.change && item.change(formData[item.prop])"></el-input-number>
<div v-if="item.type === 'inputRangeNum'" style="display: inline-flex">
<el-input-number size="small"
placeholder="请输入" :min="0"
v-model.trim="formData[item.propMin]"
:disabled="item.disabled"
:style="{ width: item.width }"
@change="item.change && item.change(formData[item.propMin])"></el-input-number>
<el-input-number size="small"
placeholder="请输入" :min="0"
v-model.trim="formData[item.propMax]"
:disabled="item.disabled"
:style="{ width: item.width }"
@change="item.change && item.change(formData[item.propMax])"></el-input-number>
</div>
<!-- 下拉框 -->
<el-select v-if="item.type === 'select'"
v-model="formData[item.prop]"
:disabled="item.disabled"
size="small"
clearable
:style="{ width: item.width }"
@change="item.change && item.change(formData[item.prop])">
<el-option v-for="option in item.options"
:label="option.label"
:value="option.value"
:key="option.value"></el-option>
</el-select>
<!-- 自选下拉框 -->
<el-select v-if="item.type === 'selectSelf'"
v-model="formData[item.prop]"
:disabled="item.disabled"
size="small"
clearable
:style="{ width: item.width }"
@change="item.change && item.change(formData[item.prop])">
<el-option v-for="option in item.options"
:label="option.name"
:value="option.value"
:key="option.name"></el-option>
</el-select>
<!-- 单选框 -->
<el-radio-group v-if="item.type === 'radio'"
v-model="formData[item.prop]"
:disabled="item.disabled"
@change="item.change && item.change(formData[item.prop])">
<el-radio v-for="radio in item.radios"
size="small"
:label="radio.val"
:key="radio.label">{{radio.label}}</el-radio>
</el-radio-group>
<!-- 复选框 -->
<el-checkbox-group v-if="item.type === 'checkbox'"
v-model="formData[item.prop]"
:disabled="item.disabled"
@change="checkboxChange">
<el-checkbox v-for="checkbox in item.checkboxs"
size="small"
:label="checkbox.label"
:key="checkbox.label">
{{checkbox.name}}
</el-checkbox>
</el-checkbox-group>
<el-date-picker v-if="item.type === 'date'"
v-model="formData[item.prop]"
type="date"
style="width:100%;"
size="small"
placeholder="请选择日期"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker v-if="item.type === 'daterange'"
v-model="formData[item.prop]"
type="daterange"
style="width:100%;"
size="small"
range-separator="至"
placeholder="请选择日期"
format="yyyy 年 MM 月 dd 日"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
<select-tree-dialog v-if="item.type === 'codeTreeDialog'"
:placeholder="'请选择'"
:sendId="item.id"
:formData="formData"
:currentItem="item" />
<select-tree-dialog v-if="item.type == 'codeTreeDialogs'"
:placeholder="'请选择'"
:sendId="item.id"
:formData="formData"
:currentItem="item" />
</el-form-item>
<!-- 操作按钮 -->
<div class="searchBtn">
<div v-for="item in searchHandle"
:key="item.label">
<el-button v-if="!item.show ? item.show : true"
:class="item.class"
:type="item.type"
:icon="item.icon"
size="small"
@click.native.prevent="item.handle()">
{{ item.label }}
</el-button>
</div>
</div>
</el-form>
</div>
</template>
<script>
import SelectTreeDialog from "@c/treeCode_components.vue";
import axios from "axios";
import base from "@/api/base";
import { foreachTree } from '@/utils/util.js'
export default {
components: {
SelectTreeDialog,
},
props: {
isActive: {
type: Boolean,
default: false,
},
// 表单域标签的宽度
labelWidth: {
type: String,
default: '100px'
},
// 表单域标签的位置
labelPosition: {
type: String,
default: 'right'
},
// 表单配置
formConfig: {
type: Array,
required: true
},
// 表单数据
formData: {
type: Object,
required: true
},
// 表单规则
rules: {
type: Array,
},
searchHandle: {
type: Array,
required: true
}
},
created () {
this.init()
},
methods: {
checkboxChange (val) {
console.log(val)
},
init () {
let self = this;
/*获取字典*/
// // debugger;
self.formConfig.forEach((val) => {
if (val.type == "codeTree" || val.type == "codeTreeDialog") {
if (val.codeOptions.length == 0) {
axios
.get(`JsonData/${val.codeTree}.json`)
.then((res) => {
self.$set(val, "codeOptions", res.data.rows);
})
.catch((err) => {
console.log(err);
});
}
} else if (val.type == "codeTreeDialogs") {
let unitcode = JSON.parse(localStorage.getItem("userInfo")).unitcode;
let grade = JSON.parse(localStorage.getItem("userInfo")).grade;
if (grade == 'S' || grade == 'T') {
var newUnicode = unitcode.substring(0, 2) + '0000000000'
} else if (grade == 'D') {
var newUnicode = unitcode.substring(0, 4) + '00000000'
} else if (grade == 'X') {
var newUnicode = unitcode.substring(0, 6) + '000000'
} else if (grade == 'K') {
var newUnicode = unitcode.substring(0, 8) + '0000'
}
if (val.codeOptions.length == 0) {
axios
.get(`JsonData/${val.codeTree}.json`)
.then((res) => {
// console.log(res.data.rows, res.data.data.rows);
// return
let dwList = (res.data.rows ? res.data.rows : res.data.data.rows).filter(item => item.id.includes(newUnicode.substring(0, 2)))
if (dwList.length > 0) {
let result
foreachTree(dwList, (item) => { if (item.id === newUnicode) result = item })
if (grade == 'S' || grade == 'T') {
self.$set(val, "codeOptions", dwList);
} else {
self.$set(val, "codeOptions", [result]);
}
}
})
.catch((err) => {
console.log(err);
});
}
}
});
},
},
}
</script>
<style lang="scss" scoped>
.el-form {
.el-form-item {
display: inline-block;
width: 25%;
}
.formItem3 {
width: 33%;
}
.searchBtn {
display: flex;
justify-content: center;
.el-button {
width: 98px;
}
}
}
</style>
\ No newline at end of file
...@@ -58,6 +58,53 @@ export default [ ...@@ -58,6 +58,53 @@ export default [
component: () => import("@/views/jump.vue") component: () => import("@/views/jump.vue")
}, },
{ {
path: "/addJszcyy",
name: "addJszcyy",
meta: {
title: '建设众创任务',
auth: 5
},
component: () => import("@/views/rzcx/addJszcyy.vue")
},
{
path: "/addCgcs",
name: "addCgcs",
meta: {
title: '新增成果测试',
auth: 5
},
component: () => import("@/views/rzcx/addCgcs.vue")
},
{
path: "/addCggl",
name: "addCggl",
meta: {
title: '建设众创任务',
auth: 5
},
component: () => import("@/views/rzcx/addCggl.vue")
},
{
path: "/jszcyyDetail",
name: "jszcyyDetail",
meta: {
title: '建设众创任务详情',
auth: 5
},
component: () => import("@/views/rzcx/jszcyyDetail.vue")
},
{
path: "/jszcyycgDetail",
name: "jszcyycgDetail",
meta: {
title: '任务详情',
auth: 5
},
component: () => import("@/views/rzcx/jszcyycgDetail.vue")
},
{
path: "/callQuery", path: "/callQuery",
name: "callQuery", name: "callQuery",
meta: { meta: {
...@@ -257,6 +304,53 @@ export default [ ...@@ -257,6 +304,53 @@ export default [
} }
}, },
{ {
path: "jszcyygl",
name: "jszcyygl",
component: () => import("@/views/rzcx/jszcyygl.vue"),
meta: {
title: "运控管理"
}
},
{
path: "ydsbgl",
name: "ydsbgl",
component: () => import("@/views/rzcx/ydsbgl.vue"),
meta: {
title: "运控管理"
}
}, {
path: "yyrzgl",
name: "yyrzgl",
component: () => import("@/views/rzcx/yyrzgl.vue"),
meta: {
title: "运控管理"
}
},
{
path: "ydjwZdbbgl",
name: "ydjwZdbbgl",
component: () => import("@/views/rzcx/ydjwZdbbgl.vue"),
meta: {
title: "运控管理"
}
},
{
path: "jszcyyglCgcs",
name: "jszcyyglCgcs",
component: () => import("@/views/rzcx/jszcyyglCgcs.vue"),
meta: {
title: "运控管理"
}
},
{
path: "jszcyyglCgpg",
name: "jszcyyglCgpg",
component: () => import("@/views/rzcx/jszcyyglCgpg.vue"),
meta: {
title: "运控管理"
}
},
{
path: "jwzdjappykgl", path: "jwzdjappykgl",
name: "jwzdjappykgl", name: "jwzdjappykgl",
component: () => import("@/views/rzcx/jwzdjappykgl.vue"), component: () => import("@/views/rzcx/jwzdjappykgl.vue"),
......
...@@ -11954,7 +11954,29 @@ let rzcxPropLeftMenu = [ ...@@ -11954,7 +11954,29 @@ let rzcxPropLeftMenu = [
// pz: "8 vCPU 16 GiB (I/O优化)", // pz: "8 vCPU 16 GiB (I/O优化)",
// }, // },
] ]
} },
{
id: 'jszcyygl',
label: '建设众创应用管理',
index: '8',
className: 'iconfont iconshujuziyuan'
},
{
id: 'ydsbgl',
label: '移动警务管理',
index: '9',
className: 'iconfont iconyidongzhongduanAPPyunkong',
children: [
{
id: 'ydsbgl',
label: '移动设备管理',
index: '9-1'
}, {
id: 'yyrzgl',
label: '应用日志管理',
index: '9-2'
},]
},
// { // {
// id: 'gawzdsjsb', // id: 'gawzdsjsb',
// label: '公安网阵地数据上报', // label: '公安网阵地数据上报',
...@@ -12167,10 +12189,10 @@ let rzcxCxDefaultFormThead = [ ...@@ -12167,10 +12189,10 @@ let rzcxCxDefaultFormThead = [
label: "用户姓名", label: "用户姓名",
prop: "xxdjryXm" prop: "xxdjryXm"
}, },
{ // {
label: '登录类型', // label: '登录类型',
prop: 'yhDllx' // prop: 'yhDllx'
}, // },
{ {
/*table默认得表头*/ /*table默认得表头*/
label: "登录时间", label: "登录时间",
......
...@@ -6251,10 +6251,10 @@ let rzcxCxDefaultFormThead = [ ...@@ -6251,10 +6251,10 @@ let rzcxCxDefaultFormThead = [
label: '用户姓名', label: '用户姓名',
prop: 'xxdjryXm' prop: 'xxdjryXm'
}, },
{ // {
label: '登录类型', // label: '登录类型',
prop: 'yhDllx' // prop: 'yhDllx'
}, // },
{ {
/*table默认得表头*/ /*table默认得表头*/
label: '登录时间', label: '登录时间',
......
<template>
<div class="formContent">
<div class="subTitle">
<span class="subTitle_shuxian"></span>
<div class="subTitle_title">
{{ $route.query.id ? "修改" : "新增" }}成果测试
</div>
</div>
<el-form
ref="form"
:model="form"
label-width="120px"
style="margin-top: 20px"
>
<el-row :gutter="20">
<el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item
label="标题"
prop="bt"
:rules="{
required: true,
message: '请输入标题',
trigger: 'blur',
}"
>
<el-input v-model="form.bt"></el-input>
</el-form-item></div
></el-col>
<!-- <el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item label="组织单位">
<el-input v-model="form.zzdw"></el-input>
</el-form-item></div
></el-col> -->
<el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item
label="测试人员"
prop="csry"
:rules="{
required: true,
message: '请输入测试人员',
trigger: 'blur',
}"
>
<el-input v-model="form.csry"></el-input>
</el-form-item></div
></el-col>
<el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item
label="测试结果"
prop="csjg"
:rules="{
required: true,
message: '请输入测试结果',
trigger: 'blur',
}"
>
<el-input v-model="form.csjg"></el-input>
</el-form-item></div
></el-col>
</el-row>
<el-row :gutter="20">
<!-- <el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item label="研判支撑主键">
<el-input v-model="form.glxxzjbh"></el-input>
</el-form-item></div
></el-col> -->
</el-row>
<el-row :gutter="20">
<el-col :span="24"
><div class="grid-content bg-purple">
<el-form-item
label="测试内容"
prop="csnr"
:rules="{
required: true,
message: '请输入测试内容',
trigger: 'blur',
}"
>
<el-input
v-model="form.csnr"
type="textarea"
:rows="4"
></el-input>
</el-form-item></div
></el-col>
</el-row>
</el-form>
<div class="btnWrap">
<el-button
v-if="$route.query.id"
type="primary"
size="small"
@click="update"
>修改</el-button
>
<el-button v-else type="primary" size="small" @click="save"
>保存</el-button
>
</div>
</div>
</template>
<script>
import url from "@/api/base";
import request from "@/utils/axiosHttp.js";
import qs from "qs";
export default {
data() {
return {
form: {
bt: "",
csnr: "",
zzdw: "",
csry: "",
csjg: "",
// glxxzjbh: ""
},
};
},
mounted() {
if (this.$route.query.id) {
this.getDetail();
} else {
this.form.zzdw = JSON.parse(sessionStorage.getItem("userInfo")).unitcode;
}
},
methods: {
save() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.glxxzjbh = this.$route.query.xxzjbh;
this.doQueryRequest(this.form, "/ypzc/saveYpzccgcs").then((res) => {
if (res.code == 200) {
this.$message.success("保存成功");
this.$router.push({
path: "/rzcxIndex/jszcyyglCgcs",
query: {
xxzjbh: this.$route.query.xxzjbh,
},
});
}
});
} else {
setTimeout(() => {
// this.$message("请填写必填字段");
this.$alert("请填写必填字段!", "提示", {
confirmButtonText: "确定",
type: "warning",
});
return false;
}, 100);
}
});
},
update() {
this.$refs.form.validate((valid) => {
if (valid) {
this.doQueryRequest(this.form, "/ypzc/updateYpzccgcs").then((res) => {
if (res.code == 200) {
this.$message.success("修改成功!");
this.$router.push({
path: "/rzcxIndex/jszcyyglCgcs",
query: {
xxzjbh: this.$route.query.bh,
},
});
} else {
this.$message.error("修改失败!");
}
});
} else {
console.log("error");
}
});
},
getDetail() {
this.doQueryRequest(
{ xxzjbh: this.$route.query.id },
"/ypzc/getYpcgcsxq"
).then((res) => {
if (res.code == 200) {
console.log(res);
this.form.bt = res.data.cgcs.bt;
this.form.csnr = res.data.cgcs.csnr;
this.form.zzdw = res.data.cgcs.zzdw;
this.form.csry = res.data.cgcs.csry;
this.form.csjg = res.data.cgcs.csjg;
this.form.glxxzjbh = res.data.cgcs.glxxzjbh;
this.form.xxzjbh = res.data.cgcs.xxzjbh;
}
});
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
},
};
</script>
<style scoped lang="scss">
.formContent {
width: 1180px;
background: #ffffff;
border: 1px solid #e4e4e4;
opacity: 1;
border-radius: 8px;
margin: 20px auto;
padding-right: 20px;
.subTitle {
display: flex;
align-items: center;
margin: 15px 20px;
.subTitle_shuxian {
width: 4px;
height: 16px;
background: #ff8d1e;
opacity: 1;
margin-right: 12px;
}
.subTitle_title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #1a1a1a;
opacity: 1;
}
}
.btnWrap {
text-align: right;
margin: 10px 20px;
}
}
</style>
\ No newline at end of file
<template>
<div class="formContent" v-loading="loading">
<div class="subTitle">
<span class="subTitle_shuxian"></span>
<div class="subTitle_title">新增成果</div>
</div>
<el-form
ref="form"
:model="form"
label-width="120px"
style="margin-top: 20px"
>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item
label="标题"
prop="bt"
:rules="{
required: true,
message: '请输入标题',
trigger: 'blur',
}"
>
<el-input v-model="form.bt"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item
label="评估内容"
prop="pgnr"
:rules="{
required: true,
message: '请输入标题',
trigger: 'blur',
}"
>
<el-input v-model="form.pgnr"></el-input>
</el-form-item>
</div>
</el-col>
<!-- <el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="组织单位">
<el-input v-model="form.zzdw"></el-input>
</el-form-item>
</div>
</el-col> -->
<el-col :span="8">
<el-form-item
label="评估人员"
prop="pgry"
:rules="{ required: true, message: '请输入标题', trigger: 'blur' }"
>
<el-input v-model="form.pgry"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="15">
<el-form-item
label="评估结果"
prop="pgjg"
:rules="{ required: true, message: '请输入标题', trigger: 'blur' }"
>
<el-input v-model="form.pgjg" type="textarea" :rows="4"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="btnWrap">
<el-button type="primary" size="small" @click="save">保存</el-button>
</div>
</div>
</template>
<script>
import url from "@/api/base";
import request from "@/utils/axiosHttp.js";
import qs from "qs";
export default {
data() {
return {
form: {
bt: "",
pgnr: "",
zzdw: "",
pgry: "",
pgjg: "",
},
};
},
methods: {
save() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.zzdw = JSON.parse(
sessionStorage.getItem("userInfo")
).unitcode;
this.form.glxxzjbh = this.$route.query.glxxzjbh;
if (this.$route.query.xxzjbh) {
this.form.xxzjbh = this.$route.query.xxzjbh;
this.doQueryRequest(this.form, "/ypzc/updateYpzccgpg").then(
(res) => {
if (res.code == 200) {
this.$message.success("保存成功");
this.$router.push({
path: "/rzcxIndex/jszcyyglCgpg",
query: {
xxzjbh: this.$route.query.glxxzjbh,
},
});
}
}
);
} else {
this.doQueryRequest(this.form, "/ypzc/saveYpzccgpg").then((res) => {
if (res.code == 200) {
this.$message.success("保存成功");
this.$router.push({
path: "/rzcxIndex/jszcyyglCgpg",
query: {
xxzjbh: this.$route.query.glxxzjbh,
},
});
}
});
}
} else {
setTimeout(() => {
// this.$message("请填写必填字段");
this.$alert("请填写必填字段!", "提示", {
confirmButtonText: "确定",
type: "warning",
});
return false;
}, 100);
}
});
},
getShuju() {
this.doQueryRequest(
{ xxzjbh: this.$route.query.xxzjbh },
"/ypzc/getYpcgpgxq"
).then((res) => {
if (res.code == 200) {
for (const key in this.form) {
if (key == "yjsjStr") {
this.$set(this.form, key, res.data.cgpg["yjsj"]);
} else {
this.$set(this.form, key, res.data.cgpg[key]);
}
this.loading = false;
}
}
});
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
},
created() {
if (this.$route.query.xxzjbh) {
this.title = "修改成果";
this.getShuju();
this.loading = true;
}
},
};
</script>
<style scoped lang="scss">
.formContent {
width: 1180px;
background: #ffffff;
border: 1px solid #e4e4e4;
opacity: 1;
border-radius: 8px;
margin: 20px auto;
.subTitle {
display: flex;
align-items: center;
margin: 15px 20px;
.subTitle_shuxian {
width: 4px;
height: 16px;
background: #ff8d1e;
opacity: 1;
margin-right: 12px;
}
.subTitle_title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #1a1a1a;
opacity: 1;
}
}
.btnWrap {
text-align: right;
margin: 10px 20px;
}
}
</style>
\ No newline at end of file
<template>
<div class="formContent" v-loading="loading">
<div class="subTitle">
<span class="subTitle_shuxian"></span>
<div class="subTitle_title">{{ title }}</div>
</div>
<el-form
ref="form"
:model="form"
label-width="120px"
style="margin-top: 20px"
>
<el-row :gutter="20">
<el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item
label="标题"
prop="bt"
:rules="{
required: true,
message: '请输入标题',
trigger: 'blur',
}"
>
<el-input v-model="form.bt"></el-input>
</el-form-item></div
></el-col>
<el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item
label="研究对象"
prop="yjdx"
:rules="{
required: true,
message: '请输入标题',
trigger: 'blur',
}"
>
<el-input v-model="form.yjdx"></el-input>
</el-form-item></div
></el-col>
<el-col :span="8"
><div class="grid-content bg-purple">
<el-form-item
label="研究时间"
prop="yjsjStr"
:rules="{
required: true,
message: '请输入标题',
trigger: 'blur',
}"
>
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="form.yjsjStr"
type="datetime"
placeholder="选择日期时间"
>
</el-date-picker>
</el-form-item></div
></el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item
label="研究人员"
prop="yjry"
:rules="{ required: true, message: '请输入标题', trigger: 'blur' }"
>
<el-input v-model="form.yjry"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="15">
<el-form-item
label="研究内容"
prop="nr"
:rules="{ required: true, message: '请输入标题', trigger: 'blur' }"
>
<el-input v-model="form.nr" type="textarea" :rows="4"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="btnWrap">
<el-button type="primary" size="small" @click="save">保存</el-button>
</div>
</div>
</template>
<script>
import url from "@/api/base";
import request from "@/utils/axiosHttp.js";
import qs from "qs";
export default {
data() {
return {
form: {
bt: "",
yjdx: "",
yjsjStr: "",
yjry: "",
nr: "",
},
title: "新增众创任务",
};
},
methods: {
save() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.zzdw = JSON.parse(
sessionStorage.getItem("userInfo")
).unitcode;
if (this.$route.query.xxzjbh) {
this.form.xxzjbh = this.$route.query.xxzjbh;
this.doQueryRequest(this.form, "/ypzc/updateYpzccgyj").then(
(res) => {
if (res.code == 200) {
this.$message.success("保存成功");
this.$router.push({
path: "/rzcxIndex/jszcyygl",
});
}
}
);
} else {
this.doQueryRequest(this.form, "/ypzc/saveYpzccgyj").then((res) => {
if (res.code == 200) {
this.$message.success("保存成功");
this.$router.push({
path: "/rzcxIndex/jszcyygl",
});
}
});
}
} else {
setTimeout(() => {
// this.$message("请填写必填字段");
this.$alert("请填写必填字段!", "提示", {
confirmButtonText: "确定",
type: "warning",
});
return false;
}, 100);
}
});
},
getShuju() {
this.doQueryRequest(
{ xxzjbh: this.$route.query.xxzjbh },
"/ypzc/getYpyjzcxq"
).then((res) => {
if (res.code == 200) {
for (const key in this.form) {
if (key == "yjsjStr") {
this.$set(this.form, key, res.data.yjzc["yjsj"]);
} else {
this.$set(this.form, key, res.data.yjzc[key]);
}
}
this.loading = false;
}
});
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
},
created() {
if (this.$route.query.xxzjbh) {
this.title = "修改众创任务";
this.getShuju();
this.loading = true;
}
},
};
</script>
<style scoped lang="scss">
.formContent {
width: 1180px;
background: #ffffff;
border: 1px solid #e4e4e4;
opacity: 1;
border-radius: 8px;
margin: 20px auto;
.subTitle {
display: flex;
align-items: center;
margin: 15px 20px;
.subTitle_shuxian {
width: 4px;
height: 16px;
background: #ff8d1e;
opacity: 1;
margin-right: 12px;
}
.subTitle_title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #1a1a1a;
opacity: 1;
}
}
.btnWrap {
text-align: right;
margin: 10px 20px;
}
}
</style>
\ No newline at end of file
<template>
<div class="formContent" v-loading="loading">
<div class="subTitle">
<span class="subTitle_shuxian"></span>
<div class="subTitle_title">众创任务详情</div>
</div>
<div class="infos">
<div :class="'infoWrap'+item.index" v-for="item in infoList" :key="item.id">
<span class="name">{{ item.name }}:</span>
<span class="infoContent">{{ item.content }}</span>
</div>
</div>
</div>
</template>
<script>
import url from "@/api/base";
import request from "@/utils/axiosHttp.js";
import qs from "qs";
import formItem_componentsVue from "../../components/formItem_components.vue";
export default {
data() {
return {
infoList: [
{
name: "标题",
id: "bt",
content: "",
index:1
},
{
name: "研究对象",
id: "yjdx",
content: "",
index:1
},
{
name: "研究时间",
id: "yjsjStr",
content: "",
index:1
},
{
name: "研究人员",
id: "yjry",
content: "",
index:1
},
{
name: "研究单位",
id: "zzdwmc",
content: "",
index:1
},
{
name: "研究内容",
id: "nr",
content: "",
index:2
},
],
};
},
methods: {
getShuju() {
this.doQueryRequest(
{ xxzjbh: this.$route.query.xxzjbh },
"/ypzc/getYpyjzcxq"
).then((res) => {
if (res.code == 200) {
this.infoList.forEach((item) => {
if (item.id == "yjsjStr") {
this.$set(item, "content", res.data.yjzc["yjsj"]);
} else {
this.$set(item, "content", res.data.yjzc[item.id]);
}
});
console.log(this.infoList);
this.loading = false;
}
});
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
},
created() {
if (this.$route.query.xxzjbh) {
this.getShuju();
this.loading = true;
}
},
};
</script>
<style scoped lang="scss">
.formContent {
width: 1180px;
background: #ffffff;
border: 1px solid #e4e4e4;
opacity: 1;
border-radius: 8px;
margin: 20px auto;
.subTitle {
display: flex;
align-items: center;
margin: 15px 20px;
.subTitle_shuxian {
width: 4px;
height: 16px;
background: #ff8d1e;
opacity: 1;
margin-right: 12px;
}
.subTitle_title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #1a1a1a;
opacity: 1;
}
}
.btnWrap {
text-align: right;
margin: 10px 20px;
}
.infos{
display: flex;
flex-wrap: wrap;
margin: 20px;
}
.infoWrap1{
width: 50%;
}
.infoWrap2{
width: 100%;
}
.name {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #272626;
}
.infoContent {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #000000;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
<template>
<div class="formContent" v-loading="loading">
<div class="subTitle">
<span class="subTitle_shuxian"></span>
<div class="subTitle_title">众创任务成果详情</div>
</div>
<div class="infos">
<div :class="'infoWrap'+item.index" v-for="item in infoList" :key="item.id">
<span class="name">{{ item.name }}:</span>
<span class="infoContent">{{ item.content }}</span>
</div>
</div>
</div>
</template>
<script>
import url from "@/api/base";
import request from "@/utils/axiosHttp.js";
import qs from "qs";
import formItem_componentsVue from "../../components/formItem_components.vue";
export default {
data() {
return {
infoList: [
{
name: "标题",
id: "bt",
content: "",
index:1
},
{
name: "评估人员",
id: "pgry",
content: "",
index:1
},
{
name: "组织单位",
id: "zzdwmc",
content: "",
index:1
},
{
name: "评估结果",
id: "pgjg",
content: "",
index:1
},
{
name: "研究内容",
id: "nr",
content: "",
index:2
},
],
};
},
methods: {
getShuju() {
this.doQueryRequest(
{ xxzjbh: this.$route.query.xxzjbh },
"/ypzc/getYpcgpgxq"
).then((res) => {
if (res.code == 200) {
this.infoList.forEach((item) => {
if (item.id == "yjsjStr") {
this.$set(item, "content", res.data.cgpg["yjsj"]);
} else {
this.$set(item, "content", res.data.cgpg[item.id]);
}
});
console.log(this.infoList);
this.loading = false;
}
});
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
},
created() {
if (this.$route.query.xxzjbh) {
this.getShuju();
this.loading = true;
}
},
};
</script>
<style scoped lang="scss">
.formContent {
width: 1180px;
background: #ffffff;
border: 1px solid #e4e4e4;
opacity: 1;
border-radius: 8px;
margin: 20px auto;
.subTitle {
display: flex;
align-items: center;
margin: 15px 20px;
.subTitle_shuxian {
width: 4px;
height: 16px;
background: #ff8d1e;
opacity: 1;
margin-right: 12px;
}
.subTitle_title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #1a1a1a;
opacity: 1;
}
}
.btnWrap {
text-align: right;
margin: 10px 20px;
}
.infos{
display: flex;
flex-wrap: wrap;
margin: 20px;
}
.infoWrap1{
width: 50%;
}
.infoWrap2{
width: 100%;
}
.name {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #272626;
}
.infoContent {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #000000;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<right-content
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
:isPost="true"
@add="add"
@edit="edit"
@del="del"
@godetail="godetail"
:pageFlag="pageFlag"
ref="rightContent"
></right-content>
</div>
</template>
<!--建设众创应用管理-->
<script>
import rightContent from "@c/ptCxForm_components.vue";
import request from "@/utils/axiosHttp.js";
import url from "@/api/base";
import qs from "qs";
export default {
name: "jszcyygl",
components: {
rightContent,
},
data() {
return {
pageFlag: "jszcyygl",
header: "建设众创应用管理",
cxFormData: {
bt: "",
nr: "",
zzdw: "",
limit: 10,
page: 1,
yjry: "",
yjdx: "",
},
cxQueryField: [
{
name: "标题",
id: "bt",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "研究对象",
id: "yjdx",
type: "text",
value: "",
placeholder: "",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "标题",
prop: "bt",
toInfo: true,
},
{
/*table默认得表头*/
label: "内容",
prop: "nr",
},
{
label: "组织单位",
prop: "zzdwmc",
},
{
label: "研究对象",
prop: "yjdx",
},
{
label: "研究人员",
prop: "yjry",
},
{
label: "研究时间",
prop: "yjsj",
},
],
cxUrl: "/ypzc/getYpyjzclb",
};
},
methods: {
del(item) {
let self = this;
this.$confirm("此操作将删除信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log(2132);
self
.doQueryRequest({ xxzjbh: item.xxzjbh }, "/ypzc/deleteYpzccgyj")
.then((res) => {
if (res.code == 200) {
self.$message.success("删除成功");
this.$refs.rightContent.doQuery("yes");
} else {
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
godetail(item) {
this.$router.push({
path: "/jszcyyDetail",
query: { xxzjbh: item.xxzjbh },
});
},
edit(item) {
this.$router.push({
path: "/addJszcyy",
query: { xxzjbh: item.xxzjbh },
});
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
add() {
this.$router.push({
path: "/addJszcyy",
});
},
},
};
</script>
<style scoped>
</style>
<template>
<div>
<right-content
ref="cgcs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
:isPost="true"
:pageType='pageType'
@add="add($route.query)"
@godetail="godetail"
@edit="edit"
@del="onDelete"
:pageFlag="pageFlag"
>
</right-content>
</div>
</template>
<!--建设众创应用管理-->
<script>
import rightContent from "@c/ptCxForm_components.vue";
import url from "@/api/base";
import request from "@/utils/axiosHttp.js";
import qs from "qs";
export default {
name: "jszcyygl",
components: {
rightContent,
},
data() {
return {
pageFlag: "jszcyygl",
pageType:"jszcyygl",
header: "成果测试",
cxFormData: {
bt: "",
zzdw: "",
limit: 10,
page: 1,
csnr: '',
csry: '',
csjg: ''
},
cxQueryField: [
{
name: "标题",
id: "bt",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "测试内容",
id: "csnr",
type: "text",
value: "",
placeholder: "",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "标题",
prop: "bt",
toInfo: true,
},
{
/*table默认得表头*/
label: "测试内容",
prop: "csnr",
},
{
label: "组织单位名称",
prop: "zzdwmc",
},
{
label: "测试人员",
prop: "csry",
},
{
label: "测试结果",
prop: "csjg",
},
{
label: "研究支撑主键编号",
prop: "glxxzjbh",
},
],
cxUrl: "/ypzc/getYpcgcslb",
};
},
created() {
this.cxFormData.glxxzjbh = this.$route.query.xxzjbh;
},
methods: {
add(row) {
this.$router.push({
path: '/addCgcs',
query: {
xxzjbh: row.xxzjbh
}
})
},
edit(e) {
this.$router.push({
path: '/addCgcs',
query: {
id: e.xxzjbh,
bh: this.$route.query.xxzjbh
}
})
},
onDelete(row) {
this.$confirm('确认删除?')
.then(() => {
this.doQueryRequest({ xxzjbh: row.xxzjbh }, "/ypzc/deleteYpzccgcs").then((res) => {
if (res.code == 200) {
this.$message.success("删除成功!");
this.$refs.cgcs.doQuery('yes')
}
})
}).catch(() => {
});
},
godetail(e) {
console.log(e)
this.$router.push({
path: '/cgcsDetail',
query: {
id: e.xxzjbh
}
})
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
}
}
};
</script>
<style scoped>
</style>
<template>
<div>
<right-content
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
:isPost="true"
@add="add"
@edit="edit"
@godetail="godetail"
@del="del"
:pageFlag="pageFlag"
ref="rightContent"
></right-content>
</div>
</template>
<!--建设众创应用管理-->
<script>
import rightContent from "@c/ptCxForm_components.vue";
import request from "@/utils/axiosHttp.js";
import url from "@/api/base";
import qs from "qs";
export default {
name: "jszcyygl",
components: {
rightContent,
},
data() {
return {
pageFlag: "jszcyygl",
header: "建设众创应用管理",
cxFormData: {
bt: "",
pgnr: "",
zzdw: "",
limit: 10,
page: 1,
pgjg: "",
pgry: "",
},
cxQueryField: [
{
name: "标题",
id: "bt",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "评估内容",
id: "pgnr",
type: "text",
value: "",
placeholder: "",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "标题",
prop: "bt",
toInfo: true,
},
{
/*table默认得表头*/
label: "评估内容",
prop: "pgnr",
},
{
label: "组织单位",
prop: "zzdwmc",
},
{
label: "评估人员",
prop: "pgry",
},
{
label: "评估结果",
prop: "pgjg",
},
],
cxUrl: "/ypzc/getYpcgpglb",
};
},
created() {
this.cxFormData.glxxzjbh = this.$route.query.xxzjbh;
},
methods: {
godetail(item) {
this.$router.push({
path: "/jszcyycgDetail",
query: { xxzjbh: item.xxzjbh },
});
},
del(item) {
this.$confirm(`确定要删除吗?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.doQueryRequest(
{ xxzjbh: item.xxzjbh },
"/ypzc/deleteYpzccgpg"
).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
this.$refs.rightContent.doQuery("yes");
} else {
}
});
});
// debugger;
// let self = this;
// this.$confirm("此操作将删除信息, 是否继续?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// })
// .then(() => {
// console.log(2132);
// self
// .doQueryRequest({ xxzjbh: item.xxzjbh }, "/ypzc/deleteYpzccgyj")
// .then((res) => {
// debugger;
// if (res.code == 200) {
// self.$message.success("删除成功");
// this.$refs.rightContent.doQuery("yes");
// } else {
// }
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "已取消删除",
// });
// });
},
edit(item) {
debugger;
this.$router.pushToTab({
path: "/addCggl",
query: {
xxzjbh: item.xxzjbh,
glxxzjbh: this.$route.query.xxzjbh,
},
});
},
doQueryRequest(form, cxUrl) {
/*post方法*/
return request({
url: url.rzURL + cxUrl,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
add() {
this.$router.pushToTab({
path: "/addCggl",
query: {
glxxzjbh: this.$route.query.xxzjbh,
},
});
},
},
};
</script>
<style scoped>
</style>
<template>
<div id="ydjwZdbbgl">
<right-content :header="header"
:cxFormData="cxFormData"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
:pageBs="pageBs"
ref="rightContent"
@releaseNewVersion="releaseNewVersion"></right-content>
<el-dialog title="发布新版本信息"
:visible.sync="dialogVisible"
width="30%">
<div v-loading="loadingFbxbb"
class="fbxbb">
<el-form ref="form"
:rules="rules"
:model="form">
<el-form-item prop="version"
label=" 版本号:">
<el-input v-model="form.version"></el-input>
</el-form-item>
<el-form-item label="更新备注:">
<el-input type="textarea"
v-model="form.gxbz"></el-input>
</el-form-item>
<el-form-item label="更新文件:">
<el-upload class="upload-demo"
action="#"
accept=".xls,.xlsx"
:on-change="fileOnchange"
:on-remove="
(flie, fileList) => {
fileArr = fileList;
}
"
:auto-upload="false"
:http-request="() => {}"
:file-list="fileArr">
<el-button size="small"
type="primary">选择上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer"
class="dialog-footer">
<el-button style="margin-left: 35%"
@click="dialogVisible = false">取 消</el-button>
<el-button type="primary"
@click="submitCKD('form')">确 定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<!--警务终端及APP运控管理-->
<script>
import rightContent from "@c/ptCxForm_components.vue";
import request from "@/utils/axiosHttp.js";
import url from "@/api/base";
import {
ydjwZdbbglHeader,
ydjwZdbbglFormData,
ydjwZdbbglDefaultFormThead,
ydjwZdbbglURL,
} from "@/utils/params";
export default {
name: "sjzyykgl",
components: {
rightContent,
},
data () {
return {
rules: {
version: [{ required: true, message: "请输入版本号", trigger: "blur" }],
},
form: {
version: "",
gxbz: "",
},
fileArr: [],
loadingFbxbb: false,
dialogVisible: false,
pageBs: "ydjwZdbbgl",
cxFormData: ydjwZdbbglFormData,
// cxQueryField: ydjwZdbbglQueryField,
cxDefaultFormThead: ydjwZdbbglDefaultFormThead,
cxUrl: ydjwZdbbglURL,
header: ydjwZdbbglHeader,
};
},
methods: {
releaseNewVersion () {
(this.form = {
version: "",
gxbz: "",
}),
(this.fileArr = []);
this.dialogVisible = true;
},
fileOnchange (file, fileList) {
if (fileList.length > 0) {
this.fileArr = [fileList[0]]; // 这一步,是 展示最后一次选择的csv文件
if (fileList.length > 1) this.$message.error("只能上传一个文件!");
}
},
submitCKD (form) {
this.$refs[form].validate((valid) => {
if (valid) {
if (this.fileArr.length <= 0) {
this.$message.warning("请选择文件");
} else {
this.postFbxbbList();
}
} else {
return false;
}
});
},
postFbxbbList () {
let self = this;
self.loadingFbxbb = true;
let params = new FormData();
for (let i in self.form) {
params.append(i, self.form[i]);
}
this.fileArr.forEach((i) => {
params.append("file", i.raw);
});
self.postFbxbb(params).then((res) => {
if (res.code == 200) {
this.$refs.rightContent.doQuery("yes");
this.$message.success("发布新版本成功");
this.loadingFbxbb = false;
this.dialogVisible = false;
} else {
self.loadingFbxbb = false;
this.$message.error(res.message);
}
});
},
// 发布新版本
postFbxbb (form) {
return request({
url: url.rzURL + "/bbgx/fileUpload",
data: form,
method: "POST",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
},
};
</script>
<style scoped lang='scss'>
.fbxbb {
padding: 20px 5px;
::v-deep.el-form-item__content {
display: flex !important;
width: 63%;
}
::v-deep.el-form-item__label {
width: 20%;
}
::v-deep.el-form-item__error {
left: 0px;
top: 38px;
}
}
</style>
<template>
<div>
<right-content :header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"></right-content>
</div>
</template>
<script>
import rightContent from "@c/ptCxForm_components.vue";
import {
rzcxcxHeader,
rzcxcxFormData,
rzcxCxQueryField,
rzcxCxDefaultFormThead,
rzcxCxURL
} from "@/utils/params";
export default {
name: "yyrzgl",
components: {
rightContent
},
data () {
return {
cxFormData: rzcxcxFormData,
cxQueryField: rzcxCxQueryField,
cxDefaultFormThead: rzcxCxDefaultFormThead,
cxUrl: rzcxCxURL,
header: rzcxcxHeader
};
}
}
</script>
<style scoped>
</style>
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