3eafb84c by 蔡俊立
2 parents 2863feb9 f7048649
......@@ -5,4 +5,4 @@ NODE_ENV=development
VUE_APP_BASE_API = '/bdcdj'
# 开发环境
VUE_APP_API_BASE_URL = 'http://192.168.2.88:8018'
VUE_APP_API_BASE_URL = 'http://192.168.2.95:8018'
......
......@@ -5,7 +5,7 @@
<div :style="{'text-align':titleStyle}"><b >{{title}}</b></div>
<i class="el-icon-close" @click="onCancel" ></i>
<div class="ls-mask-content">
<component :is="editItem" ref='childRef' @loading='loadingFn' />
<component :is="editItem" ref='childRef' @loading='loadingFn' :formData='formData' />
</div>
<div class="ls-mask-footer">
<el-button type="primary" @click="onConfirm">{{confirmText}}</el-button>
......@@ -25,10 +25,13 @@
confirmText: '确认',
isSync: false,
isShow: false,
cancel: function () {},
confirm: function () {},
editItem:"",
titleStyle:'',
width:"75%",
height:"500px",
formData:"",//父组件传递的参数 负责传给子组件
}
},
props:{
......@@ -42,10 +45,17 @@
methods: {
onCancel () {
this.isShow = false
this.cancel()
},
onConfirm () {
this.loading = true
this.$refs.childRef.childFn()
let isOk = this.$refs.childRef.childFn() //子组件方法 必须命名一致
if(isOk || isOk==undefined){ //如果子组件没有 return false 就代表子组件方法一切正常
this.isShow = false
this.confirm()
}else{ //否则
console.log('弹窗不关闭')
}
},
loadingFn(e){ //加载状态
this.loading = e
......
弹窗封装
1.在main.js中引入 import Popup from './components/tanchuang/index'
Vue.prototype.$popup = Popup.install
2.用法以及参数:
this.$popup({
title: '提示', // 弹窗标题
titleStyle:"", //标题存在的位置 center left
width:"", //弹窗的宽度
height:"", //弹窗的高度
editItem: 'ywbl/dbx/aa', // 子组件的路径 相当于你平时img取的路径
formData:this.formData, //父组件传给子组件的参数
confirmText:"" // 确认按钮的文字
cancelText:"" //取消按钮的文字
cancel: function () {}, //取消事件的回调
confirm: function () {}, //确认事件的回调
})
3.子组件的方法名字必须统一为 childFn()
4.子组件切记props接收 父组件传参formData
以及在使用结束后传loading状态给父组件
5.后续有修改请添加在此处文档说明作用
\ No newline at end of file
<template>
<div class="dashboard-container">
11111111
<img src="./home.png" alt="">
</div>
</template>
......@@ -28,8 +28,13 @@ export default {
}
}
</script>
<style >
<style scoped lang="scss">
.dashboard-container {
height: 100%;
img {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
......
......@@ -100,6 +100,15 @@ class data extends filter {
sortable: 'custom',
prop: 'fromstepdate',
width: '160'
},
{
label: '操作',
width: '80',
align: 'center',
fixed: 'right',
render: (h, scope) => {
return <el-button type="text" icon="el-icon-delete" onClick={() => { vm.del(scope.row) }}>删除</el-button>
}
}
]
}
......
......@@ -40,6 +40,7 @@ import { mapGetters } from "vuex";
import clxxAddDialog from "./clxxAddDialog.vue";
import imagePreview from '@/views/components/imagePreview.vue'
import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js";
import { async } from "q";
export default {
components: { clxxAddDialog, imagePreview },
data () {
......@@ -96,7 +97,6 @@ export default {
label: "是否必选",
width: "50",
render: (h, scope) => {
// 新增的材料,全部为系统默认可选
if (scope.row.sfxjcl === "1") {
return (
<div>
......@@ -104,7 +104,6 @@ export default {
</div>
);
}
// 系统配置的材料
else {
return (
<div>
......@@ -121,6 +120,7 @@ export default {
{
prop: "sjlx",
label: "材料类型",
width: "80",
render: (h, scope) => {
return (
<div>
......@@ -132,10 +132,12 @@ export default {
{
prop: "sjsl",
label: "份数",
width: "50"
},
{
prop: "smzt",
label: "扫描状态",
width: "80",
render: (h, scope) => {
if (scope.row.children.length > 0) {
return (
......@@ -155,6 +157,7 @@ export default {
{
prop: "ys",
label: "扫描页数",
width: "50"
},
{
label: "操作",
......@@ -193,23 +196,38 @@ export default {
imgList: [
{
url: 'https://img2.baidu.com/it/u=2955521104,3257476296&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=1111'
},
{
url: 'https://img1.baidu.com/it/u=2383300938,4241539174&fm=253&fmt=auto&app=138&f=JPEG?w=307&h=500'
}
],
]
}
}
};
},
computed: {
...mapGetters(["dictData"]),
},
mounted () {
if (this.$parent.index == 1) {
this.clmlmxInit();
}
created () {
this.clmlInitList()
},
methods: {
// 材料目录明细初始化
clmlInitList () {
return new Promise(resolve => {
this.unitData = this.$parent.unitData;
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0].bsmSldy);
formdata.append("bsmSlsq", this.$parent.bsmSlsq);
clmlInit(formdata).then((res) => {
resolve(res.code)
if (res.result.result) {
this.tableData = res.result.result;
this.treeCheckId = this.tableData[0].bsmSj;
this.title = this.tableData[0].sjmc;
this.titleYs = 1;
this.titleNum = this.tableData[0].children.length;
}
console.log(this.tableData);
})
})
},
// 左侧菜单点击
menuClick (item) {
this.checkedId = item.id
......@@ -223,42 +241,40 @@ export default {
let obj = {
xh: row.xh,
bsmSlsq: row.bsmSlsq,
moveDirection: "up",
moveDirection: "UP",
};
// 接口待调
move(obj).then((res) => {
this.clmlmxInit();
});
move(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
message: '上移成功',
type: 'success'
})
} else {
this.$message.error(res.message);
}
})
},
// 下移
moveDown (index, row) {
let obj = {
xh: row.xh,
bsmSlsq: row.bsmSlsq,
moveDirection: "down",
};
moveDirection: "DOWN",
}
// 接口待调
move(obj).then((res) => {
console.log("222222222", res);
this.clmlmxInit();
});
},
// 材料目录明细初始化
clmlmxInit () {
this.id = this.$parent.$parent.$parent.id;
this.unitData = this.$parent.$parent.$parent.unitData;
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0].bsmSldy);
formdata.append("bsmSlsq", this.id);
clmlInit(formdata).then((res) => {
if (res.result.result) {
this.tableData = res.result.result;
this.treeCheckId = this.tableData[0].bsmSj;
this.title = this.tableData[0].sjmc;
this.titleYs = 1;
this.titleNum = this.tableData[0].children.length;
move(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
message: '下移成功',
type: 'success'
})
} else {
this.$message.error(res.message);
}
});
})
},
// 新增弹窗保存
addSave (data) {
......@@ -271,12 +287,16 @@ export default {
let obj = {
bsmSlsq: this.id,
xh: maxXh + 1,
isrequired: "0",
isrequired: "1",
sjmc: data.clmc,
sjsl: 0,
smzt: '',
ys: 0,
sjlx: data.cllx,
sfxjcl: "1", // 是否是新建材料
sfxjcl: "1", // 是否必选
};
save(obj).then((res) => {
console.log(res);
if (res.code == 200) {
this.$message({
message: "新增成功",
......@@ -398,10 +418,11 @@ export default {
.menu-tree {
width: 20%;
min-width: 160px;
height: 100%;
margin-right: 30px;
margin-right: 10px;
border-right: 1px dotted #d9d9d9;
padding: 0 24px;
padding: 0 15px;
.item {
height: 60px;
......@@ -443,10 +464,9 @@ export default {
}
.child {
height: 60px;
line-height: 60px;
line-height: 36px;
border-bottom: 1px solid #e8e8e8;
padding-left: 18px;
padding-left: 10px;
color: #6b6b6b;
cursor: pointer;
box-sizing: border-box;
......
<template>
<dialogBox title="新建材料信息" width="40%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit"
<dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit"
:isFullscreen="false">
<el-form :model="ruleForm" ref="ruleForm" label-width="120px">
<el-form :model="ruleForm" ref="ruleForm" label-width="70px">
<el-row>
<el-col :span="24">
<el-form-item label="材料类型">
<el-input v-model="ruleForm.cllx"></el-input>
<el-select v-model="ruleForm.cllx" class="width100" placeholder="请选择">
<el-option v-for="item in dictData['A40']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
......@@ -21,7 +24,7 @@
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
value: { type: Boolean, default: false },
......@@ -35,6 +38,9 @@ export default {
},
};
},
computed: {
...mapGetters(["dictData"]),
},
watch: {
value (val) {
this.myValue = val;
......
......@@ -28,7 +28,7 @@
</el-form>
</div>
<div class="from-clues-content">
<lb-table border :column="tableData.columns" :data="tableData.data" :pagination="false">
<lb-table border :column="tableData.columns" :heightNum="210" :data="tableData.data" :pagination="false">
</lb-table>
</div>
</div>
......@@ -39,12 +39,12 @@ import { getCertificateList } from "@/api/fqsq.js";
import { datas } from "./fzxxdata";
export default {
mixins: [table],
components: { },
components: {},
props: {
},
data() {
data () {
return {
ruleForm: {
ysxlh: '',
......@@ -59,12 +59,10 @@ export default {
},
};
},
async created() {
},
methods: {
// 列表渲染接口
fetchData () {
this.ruleForm.bsmSldy = this.$parent.$parent.unitData[0].bsmSldy
this.ruleForm.bsmSldy = this.$parent.unitData[0].bsmSldy
getCertificateList(this.ruleForm).then(res => {
if (res.code === 200) {
this.tableData.data = res.result
......@@ -76,5 +74,4 @@ export default {
</script>
<style scoped lang='scss'>
@import "~@/styles/public.scss";
</style>
\ No newline at end of file
......
......@@ -60,6 +60,7 @@
</div>
</el-dialog>
<zsylDialog ref="zsylDialog" v-model="zsylFlag" :value='zsylFlag' />
<el-empty description="暂无数据" v-if="tableData.length==0"></el-empty>
</div>
</template>
<script>
......@@ -69,10 +70,8 @@ import { getBdcqzList, invalidCertificate } from "@/api/fqsq.js";
export default {
components: { zsylDialog },
props: {
},
data() {
data () {
return {
tableData: [],
zsylFlag: false,
......@@ -83,14 +82,14 @@ export default {
bsmSz: '',
};
},
async created() {
created () {
this.list();
},
methods: {
//初始化列表
list(){
var bsmSldy = this.$parent.$parent.unitData[0].bsmSldy
getBdcqzList({bsmSldy:bsmSldy}).then(res => {
list () {
var bsmSldy = this.$parent.unitData[0].bsmSldy
getBdcqzList({ bsmSldy: bsmSldy }).then(res => {
if (res.code === 200) {
this.tableData = res.result
if (res.result) {
......@@ -100,11 +99,11 @@ export default {
})
},
//打开证书预览弹窗
openZsylDialog(item,type){
openZsylDialog (item, type) {
this.zsylFlag = true;
this.bdcqz = item;
this.$refs.zsylDialog.bdcqz = item;
if(type == 2){
if (type == 2) {
this.$nextTick(() => {
this.$refs.zsylDialog.ysxlhList();
});
......@@ -148,10 +147,9 @@ export default {
.box-card {
float: left;
width: 330px;
margin-top: 20px;
margin-right: 20px;
height: 440px;
width: 300px;
margin-top: 10px;
margin-right: 10px;
.szxx_body {
height: 240px;
......@@ -160,9 +158,9 @@ export default {
}
.szxx_header {
color: white;
color: #ffffff;
font-weight: bolder;
font-size: 18px;
font-size: 16px;
.header_type {
display: flex;
......@@ -173,7 +171,6 @@ export default {
.header_text {
text-align: center;
margin-top: 10px;
height: 50px;
line-height: 30px;
}
}
......@@ -201,13 +198,12 @@ export default {
.operation_button {
border: 1px solid rgb(0, 121, 254);
padding: 15px 10px;
padding: 5px;
text-align: center;
width: 100px;
}
.card_padding {
padding-top: 20px
padding-top: 8px
}
.invalid-diglog {
......
......@@ -18,7 +18,13 @@
.title {
line-height: 36px;
padding-left: 10px;
text-align: center;
}
.title-detail {
display: flex;
flex-wrap: wrap;
width: 100%;
}
ul {
......@@ -52,6 +58,10 @@
width: 260px;
}
/deep/.el-menu-item {
padding-left: 5px !important;
}
/deep/.el-tabs__header {
margin-bottom: 0 !important;
}
......
......@@ -26,7 +26,7 @@
<el-menu :default-active="activeIndex" @select="unitClick">
<el-menu-item v-for="(item, index) in unitData" :index="index.toString()" :key="index">
<p>{{ item.bdcdyh }}</p>
<p>{{ item.zl }}</p>
<p class="title-detail">{{ item.zl }}</p>
</el-menu-item>
</el-menu>
</div>
......