diff --git a/src/api/medicalunion-management.js b/src/api/medicalunion-management.js index a89bf03fe8e62a6712661fd9c7e67fa84ea75c71..a56d4681dd79e5ba1b3dd8ca3a37795f82c8bc67 100644 --- a/src/api/medicalunion-management.js +++ b/src/api/medicalunion-management.js @@ -16,3 +16,9 @@ export function medicalunionList(params = {}) { params, }) } +export function deleteUnion(id) { + return request({ + url: `/cloud-upms/sys/union/${id}`, + method: "delete", + }) +} diff --git a/src/api/operation-management.js b/src/api/operation-management.js new file mode 100644 index 0000000000000000000000000000000000000000..9f9377bf48f3e8c990c3f75a0843358b30d0d560 --- /dev/null +++ b/src/api/operation-management.js @@ -0,0 +1,34 @@ +import request from "@/utils/request" + +/* æ•°æ®åº“ç®¡ç† */ + +export function addArticle(data = {}) { + return request({ + url: "/cloud-upms/sys/article/addOrUpdate", + method: "post", + data, + }) +} +// 获å–列表 +export function articleList(params = {}) { + return request({ + url: "/cloud-upms/sys/article/list", + method: "get", + params, + }) +} +// å¯ç”¨ç¦ç”¨çŠ¶æ€ +export function articleEnable(params = {}) { + return request({ + url: "/cloud-upms/sys/article/enable", + method: "get", + params, + }) +} +// åˆ é™¤æ–‡ç« +export function deleteArticle(id) { + return request({ + url: `/cloud-upms/sys/article/${id}`, + method: "delete", + }) +} diff --git a/src/components/CustomsTable/index.vue b/src/components/CustomsTable/index.vue index 1aa2d1c6bb0f71ef44634d2e1ff55666f9b10cad..652f1f80b6725119f283f3188f6a46e8eaca353a 100644 --- a/src/components/CustomsTable/index.vue +++ b/src/components/CustomsTable/index.vue @@ -11,6 +11,8 @@ :header-row-class-name="headerClass" style="width: 100%" > + <el-table-column v-if="showIndex" type="index" width="120" label="åºå·"> + </el-table-column> <template v-for="(column, index) in columns"> <template v-if="!column.type && !column.operType"> <el-table-column @@ -98,6 +100,7 @@ <template v-if="column.type === 'switch'"> <el-switch v-model="scope.row[column.value]" + :active-value="1" @change="column.func(scope.row, scope.$index)" > </el-switch> @@ -140,6 +143,7 @@ export default { headerClass: { type: String, default: "default" }, // 头部背景色Classå称,默认default columns: Array, // è¡¨æ ¼åˆ—é…置数æ®,{vlaue:对应数æ®å¯¹è±¡ä¸çš„属性,labelï¼šå¯¹åº”çš„æ˜¯æ ‡é¢˜æ–‡å—,fixed:列是å¦å›ºå®šï¼Œwidth:列宽, sortable:是å¦å¯æŽ’åºï¼Œformatter:åˆ—æ ¼å¼åŒ–, classNameï¼šå¯¹åº”çš„æ˜¯åˆ—çš„æ ·å¼ç±»å} tableData: Array, // è¡¨æ ¼æ•°æ® + showIndex: { default: false }, // 是å¦å±•示索引 }, mixins: [resize], data() { diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index 6cc65fa30f84b478e27c5038a446e4027a2c52ee..38a4d969777fe567d22f32ebfc3dde7666b483a6 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -1,9 +1,13 @@ <template> <el-row class="el-upload-self"> <el-upload - :multiple="multiple" - class="avatar-uploader" ref="upload" + :multiple="multiple" + :class="[ + 'avatar-uploader', + value.length > 0 ? 'textUpload' : '', + accept == 'application/pdf' ? 'pdfUpload' : '', + ]" :action="action" :headers="headers" :list-type="listType" @@ -11,6 +15,7 @@ :on-remove="handleRemove" :on-success="handleSuccess" :on-exceed="handleExceed" + :on-change="handleSelectFile" :before-upload="beforeUpload" :before-remove="beforeRemove" :file-list="fileList" @@ -24,23 +29,27 @@ <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到æ¤å¤„,或<em>ç‚¹å‡»ä¸Šä¼ </em></div> </template> - <template v-else-if="listType === 'picture-card'"> - <i class="el-icon-plus"></i> + <template v-else-if="value.length"> + <el-button size="middle" type="text">点击更æ¢</el-button> + </template> + + <template v-else-if="listType === 'picture-card' && !value.length"> + <el-button size="middle" type="text">ç‚¹å‡»ä¸Šä¼ </el-button> </template> <template v-else> <!-- <el-button size="middle" :type="btnType">ç‚¹å‡»ä¸Šä¼ </el-button> --> <!-- <img v-if="imageUrl" :src="imageUrl" class="avatar" /> --> - <i class="el-icon-plus avatar-uploader-icon"></i> + <el-button size="middle" type="text">ç‚¹å‡»ä¸Šä¼ </el-button> </template> - <div slot="tip" class="el-upload__tip">{{ tip }}</div> + <!-- <div slot="tip" class="el-upload__tip">{{ tip }}</div> --> </el-upload> <el-image + ref="image" style="display: none" :src="imgUrl" :preview-src-list="previewList" - ref="image" > </el-image> </el-row> @@ -50,7 +59,7 @@ import { getAccessToken } from "@/utils/accessToken" import { delFile } from "@/api/file" export default { - name: "el-upload-self", + name: "ElUploadSelf", props: { accept: { type: String, default: "image/*" }, disabled: { @@ -84,7 +93,10 @@ export default { type: String, default: "primary", }, - value: Array, //ä¸Šä¼ æ–‡ä»¶æ•°ç»„ 绑定数组 + value: { + type: Array, + default: () => [], + }, //ä¸Šä¼ æ–‡ä»¶æ•°ç»„ 绑定数组 }, data() { return { @@ -97,20 +109,6 @@ export default { fileList: [], } }, - watch: { - value: { - handler(newValue, oldValue) { - if (newValue === oldValue) return - this.fileList = newValue.map((_) => { - return { - name: _.file_name, - url: `${this.httpPrefix}/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`, - } - }) - }, - immediate: true, - }, - }, computed: { headers() { return { @@ -118,23 +116,41 @@ export default { } }, action() { - return ( - this.httpPrefix + - `/disease-data/file/upload?formId=${this.uploadQuery.formId}&patientId=${this.uploadQuery.patientId}&prefix=${this.uploadQuery.prefix}` - ) + return this.httpPrefix + `/cloud-upms/file/upload` }, // 预览list previewList() { - if (!this.value) return [] + console.log(this.value) + if (!this.value.length || this.accept != "image/*") return [] return this.value.map((_) => { return ( _.url || - `${this.httpPrefix}/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}` + `${this.httpPrefix}/cloud-upms/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}` ) }) }, }, + watch: { + value: { + handler(newValue, oldValue) { + if (newValue === oldValue) return + this.fileList = newValue.map((_) => { + return { + name: _.file_name, + url: `${this.httpPrefix}/cloud-upms/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`, + } + }) + }, + immediate: true, + }, + }, methods: { + handleSelectFile(file, fileList) { + if (fileList.length > 1) { + this.value.shift() + fileList.shift() + } + }, // ä¸Šä¼ å‰å›žè°ƒ beforeUpload(file) { return new Promise((resolve, reject) => { @@ -146,17 +162,18 @@ export default { resolve() }) }, - // 超出é™åˆ¶ handleExceed(files, fileList) { this.$message.error(`最多å¯ä¸Šä¼ ${this.limit}个文件ï¼`) }, - // ä¸Šä¼ æˆåŠŸ handleSuccess(res, file, fileList) { const { data } = res if (data) { this.value.push({ ...data, url: file.url }) + // ä¸Šä¼ æˆåŠŸ + this.$emit("input", this.value) + this.$emit("fileSuccess") } else { this.$message.warning(res.msg) this.$refs.upload.clearFiles() @@ -170,8 +187,13 @@ export default { // 移除 handleRemove({ url }, fileList) { - const i = this.value.findIndex((_) => url.endsWith(_.uuid_name)) - if (i > -1) this.value.splice(i, 1) // 陿€ç§»é™¤ + if (fileList.length > 1) { + fileList.shift() + } + this.value = [] + this.$emit("input", this.value) + // const i = this.value.findIndex((_) => url.endsWith(_.uuid_name)) + // if (i > -1) this.value.splice(i, 1) // 陿€ç§»é™¤ }, // 查看 @@ -181,7 +203,7 @@ export default { let responseUrl if (file.response) { const _ = file.response.data - responseUrl = `${this.httpPrefix}/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}` + responseUrl = `${this.httpPrefix}/cloud-upms/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}` } try { if (name.match(/\.(png|jpg|jpeg)/)) { @@ -227,16 +249,38 @@ export default { display: flex; align-items: center; } +.pdfUpload { + display: flex; + flex-direction: row-reverse; + justify-content: flex-end; + ::v-deep .el-upload-list__item { + transform: translateY(-6px); + width: 158px; + height: 40px; + } +} ::v-deep .avatar-uploader .el-upload { - border: 1px solid #d9d9d9; - border-radius: 6px; - cursor: pointer; - position: relative; - overflow: hidden; + border: none; + width: 80px; + height: 30px; + line-height: 0px; +} +::v-deep .textUpload { + align-items: flex-start; + .el-upload { + border: none; + width: 80px; + height: 30px; + line-height: 0px; + } } ::v-deep .avatar-uploader .el-upload:hover { border-color: #409eff; } +::v-deep .el-upload-list__item { + width: 88px; + height: 88px; +} .avatar-uploader-icon { font-size: 28px; color: #8c939d; @@ -250,4 +294,10 @@ export default { height: 88px; display: block; } +// ::v-deep .el-upload--picture-card { +// width: none; +// height: none; +// line-height: 0px; +// border: none; +// } </style> diff --git a/src/views/systems/medicalunion-management/index.vue b/src/views/systems/medicalunion-management/index.vue index 52162b211c99f9c98af7cb0e82f4bf2c12bb5580..c6e1979be4868b82203f6036d41fbd32359c95ae 100644 --- a/src/views/systems/medicalunion-management/index.vue +++ b/src/views/systems/medicalunion-management/index.vue @@ -8,6 +8,7 @@ ref="table" :table-data="tableData" :columns="columns" + :show-index="true" :header-class="'newHeader'" :list-loading="listLoading" :current-page="pageIndex" @@ -18,12 +19,7 @@ @currentPageChange="handleCurrentChange" /> </div> - <el-dialog - :visible.sync="addVisible" - width="520px" - :show-close="true" - @closed="clearForm" - > + <el-dialog :visible.sync="addVisible" width="520px" :show-close="true"> <div class="title">æ·»åŠ åŒ»è”体</div> <el-form ref="form" @@ -49,18 +45,29 @@ v-if="item.type == 'select'" v-model="form[item.prop]" :placeholder="'请选择' + item.label" + @change="changeCity(item.prop)" > <el-option v-for="e in item.selectGroup" :key="e.value" :label="e.label" - :value="e.value" + :value="e.label" ></el-option> </el-select> </el-form-item> </el-form> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submit()">ä¿å˜</el-button> + <el-button class="f-btn" type="primary" @click="submit()" + >ä¿å˜</el-button + > + </span> + </el-dialog> + <!-- åˆ é™¤æç¤ºæ¡† --> + <el-dialog title="æç¤º" :visible.sync="deleteVisible" width="30%"> + <span>ç¡®å®šåˆ é™¤å—?</span> + <span slot="footer" class="dialog-footers"> + <el-button @click="deleteVisible = false">å– æ¶ˆ</el-button> + <el-button type="primary" @click="confirmDelete">ç¡® 定</el-button> </span> </el-dialog> </div> @@ -71,7 +78,9 @@ import paginationMixin from "@/components/TabComponents/mixin" import { addMedicalunion, medicalunionList, + deleteUnion, } from "@/api/medicalunion-management" +import cityList from "@/data/city" export default { components: { @@ -80,6 +89,7 @@ export default { mixins: [paginationMixin], data() { return { + deleteVisible: false, addVisible: false, listLoading: false, columns: [ @@ -120,7 +130,7 @@ export default { }, }, { - func: this.rowOpration, + func: this.deleteFunc, style: { color: "#FA6400", }, @@ -134,12 +144,7 @@ export default { ], }, ], - tableData: [ - { - unionName: "第一个", - id: 123, - }, - ], + tableData: [], formList: [ { type: "input", @@ -155,21 +160,23 @@ export default { type: "select", label: "çœ", prop: "province", - selectGroup: [{ label: "北京市", value: "001" }], + selectGroup: cityList, }, { type: "select", label: "市", prop: "city", - selectGroup: [{ label: "北京市", value: "001" }], + selectGroup: [], }, ], form: {}, + deleteId: "", } }, watch: {}, mounted() { this.getMedicalunionList() + console.log(cityList) }, methods: { // 获å–list @@ -177,17 +184,35 @@ export default { medicalunionList({ size: this.pageSize, current: this.pageIndex, - }).then((res) => {}) + }).then((res) => { + if (res.code == 1) { + this.total = res.data.total + this.tableData = res.data.records + } + }) }, // æ·»åŠ åŒ»è”体 addMedical() { + if (this.$refs["form"]) { + this.clearForm() + } + this.addVisible = true }, // 编辑医è”体 editMedical(data) { console.log(data) - this.form = data + this.form = { ...data } this.addVisible = true + let value = this.form["province"] + cityList.forEach((e) => { + if (e.label == value) { + this.formList[3].selectGroup = e.children + if (e.children[0].label == "市辖区") { + this.formList[3].selectGroup[0].label = e.label + } + } + }) }, submit() { this.$refs["form"].validate((valid) => { @@ -196,18 +221,54 @@ export default { if (res.code == 1) { this.$message.success("æ·»åŠ æˆåŠŸ") this.addVisible = false + this.page = 1 + this.getMedicalunionList() } }) } else { - console.log("error submit!!") + // console.log("error submit!!") return false } }) }, + // åˆ é™¤ + deleteFunc(data) { + console.log(data) + this.deleteVisible = true + this.deleteId = data.id + }, clearForm() { this.form = {} this.$refs["form"].resetFields() }, + confirmDelete() { + this.deleteVisible = false + deleteUnion(this.deleteId) + .then((res) => { + if (res.code == 1) { + this.$message.success("åˆ é™¤æˆåŠŸ") + this.getMedicalunionList() + } + }) + .catch(() => {}) + }, + // çœä»½å˜åŒ–改å˜åŸŽå¸‚ + changeCity(val) { + console.log(val) + if (val == "province") { + delete this.form["city"] + // console.log(this.form["province"]) + let value = this.form["province"] + cityList.forEach((e) => { + if (e.label == value) { + this.formList[3].selectGroup = e.children + if (e.children[0].label == "市辖区") { + this.formList[3].selectGroup[0].label = e.label + } + } + }) + } + }, }, } </script> @@ -242,7 +303,7 @@ export default { ::v-deep .el-dialog__footer { border-top: none; text-align: center; - .el-button { + .f-btn { width: 100px; height: 32px; background: #4e68ff; diff --git a/src/views/systems/operation-management/components/HealthPopularization.vue b/src/views/systems/operation-management/components/HealthPopularization.vue index 6b2764015ee7cb38af8615fdf23c57abd9caa036..622925cc91a3f254888754ac22800aec16c12f31 100644 --- a/src/views/systems/operation-management/components/HealthPopularization.vue +++ b/src/views/systems/operation-management/components/HealthPopularization.vue @@ -1,7 +1,7 @@ <template> <div id="medicalunion-management"> <div class="top-btn"> - <el-select v-model="selectType"> + <el-select v-model="selectType" @change="getArticleList"> <el-option v-for="item in selectList" :key="item.value" @@ -47,6 +47,7 @@ :key="index" :label="item.label" :prop="item.prop" + :rules="[{ required: true, message: item.label + 'ä¸èƒ½ä¸ºç©º' }]" > <template v-if="!readOnly"> <!-- 输入框 --> @@ -61,6 +62,7 @@ v-else-if="item.type == 'select'" v-model="form[item.prop]" :placeholder="'请选择' + item.label" + style="width: 100%" > <el-option v-for="e in item.selectGroup" @@ -75,12 +77,18 @@ v-model="form[item.prop]" :btn-type="'text'" v-bind="item" + :list-type="item.listType" + :accept="item.accept" + :limit="item.limit" + @fileSuccess="fileSuccess" ></el-upload-self> <!-- switch --> <!-- switchåˆ‡æ¢ å¯ç”¨ --> <el-switch v-else-if="item.type === 'switch'" v-model="form[item.prop]" + :active-value="1" + :inactive-value="0" > </el-switch> </template> @@ -99,7 +107,12 @@ import CustomsTable from "@/components/CustomsTable" import paginationMixin from "@/components/TabComponents/mixin" import ElUploadSelf from "@/components/Upload" - +import { + articleList, + articleEnable, + deleteArticle, + addArticle, +} from "@/api/operation-management" export default { components: { CustomsTable, @@ -134,7 +147,7 @@ export default { { label: "æ ‡é¢˜", minWidth: 120, - value: "title", + value: "articleTitle", }, { label: "图片", @@ -218,58 +231,89 @@ export default { { type: "select", label: "类型", - prop: "type", + prop: "articleType", selectGroup: [ { label: "ç›æŸ¥", - value: 0, + value: 1, }, { label: "生活", - value: 1, + value: 2, }, { label: "医å¦çŸ¥è¯†", - value: 2, + value: 3, }, { label: "å…¶ä»–", - value: 3, + value: 4, }, ], }, { type: "input", label: "æ ‡é¢˜", - prop: "title", + prop: "articleTitle", }, { type: "upload", label: "图片", - prop: "img", + prop: "imgPath", + listType: "picture-card", }, { type: "upload", label: "PDF", - prop: "aaa", + prop: "filePath", + accept: "application/pdf", }, { type: "switch", label: "å¯ç”¨çжæ€", - prop: "ssd", + prop: "status", }, ], rules: { title: [{ required: true, message: "è¯·è¾“å…¥æ ‡é¢˜", trigger: "blur" }], }, - form: {}, + form: { + status: 1, + }, } }, watch: {}, - mounted() {}, + mounted() { + this.getArticleList() + }, methods: { - // æ·»åŠ åŒ»è”体 + fileSuccess(val) { + console.log(this.form) + }, + // 获å–å¥åº·ç§‘æ™® + getArticleList() { + this.listLoading = true + let params = { + size: this.pageSize, + current: this.pageIndex, + moduleType: "4", + articleType: this.selectType + 1, + } + articleList(params) + .then((res) => { + if (res.code == 1) { + this.tableData = [...res.data.records] + this.total = res.data.total + this.listLoading = false + } + }) + .catch((e) => { + this.listLoading = false + }) + }, + // æ·»åŠ æ–‡ç« addMedical() { + this.readOnly = false this.addVisible = true }, // 查看 @@ -295,15 +339,38 @@ export default { // å¯ç”¨çŠ¶æ€ openChage(data, index) { console.log(data, index) + let params = { + id: data.id, + status: data.status ? 1 : 0, + } + articleEnable(params).then((res) => { + if (res.code == 1) { + // this.$message.success("ä¿å˜æˆåŠŸ") + this.getArticleList() + } + }) }, resetForm() { this.$refs["form"].resetFields() + this.form = { + status: 1, + } }, submitForm() { this.$refs["form"].validate((valid) => { if (valid) { - alert("submit!") - this.addVisible = false + addArticle({ + ...this.form, + moduleType: "4", + }).then((res) => { + if (res.code == 1) { + this.addVisible = false + this.$refs["form"].resetFields() + this.form = { + status: 1, + } + } + }) } else { console.log("error submit!!") return false diff --git a/src/views/systems/operation-management/components/NewsMeeting.vue b/src/views/systems/operation-management/components/NewsMeeting.vue index 70a896429a42f7cdf01c7fdfda6c89920e0efc43..5f3f29ae2248e691bfd6d9f5481c13dc3b7da793 100644 --- a/src/views/systems/operation-management/components/NewsMeeting.vue +++ b/src/views/systems/operation-management/components/NewsMeeting.vue @@ -18,7 +18,15 @@ @currentPageChange="handleCurrentChange" /> </div> - <el-dialog :visible.sync="addVisible" width="520px" :show-close="true"> + <!-- åˆ é™¤æç¤ºæ¡† --> + <el-dialog title="æç¤º" :visible.sync="deleteVisible" width="30%"> + <span>ç¡®å®šåˆ é™¤å—?</span> + <span slot="footer" class="dialog-footers"> + <el-button @click="deleteVisible = false">å– æ¶ˆ</el-button> + <el-button type="primary" @click="confirmDelete">ç¡® 定</el-button> + </span> + </el-dialog> + <!-- <el-dialog :visible.sync="addVisible" width="520px" :show-close="true"> <div class="title">æ·»åŠ åŒ»è”体</div> <el-form :model="form" @@ -54,12 +62,17 @@ <span slot="footer" class="dialog-footer"> <el-button type="primary" @click="addVisible = false">ä¿å˜</el-button> </span> - </el-dialog> + </el-dialog> --> </div> </template> <script> import CustomsTable from "@/components/CustomsTable" import paginationMixin from "@/components/TabComponents/mixin" +import { + articleList, + articleEnable, + deleteArticle, +} from "@/api/operation-management" export default { components: { CustomsTable, @@ -69,16 +82,17 @@ export default { return { addVisible: false, listLoading: false, + deleteVisible: false, columns: [ { label: "æ ‡é¢˜", minWidth: 120, - value: "title", + value: "articleTitle", }, { label: "文件", minWidth: 120, - value: "file", + value: "fileCode", }, { label: "ä¸Šä¼ æ—¶é—´", @@ -88,18 +102,18 @@ export default { { label: "最新修改时间", minWidth: 120, - value: "editTime", + value: "updateTime", }, { label: "ä¸Šä¼ äººå§“å", minWidth: 120, - value: "uploadPerson", + value: "uploadUserName", }, { label: "å¯ç”¨çжæ€", minWidth: 120, type: "switch", - value: "isOpen", + value: "status", func: this.openChage, }, { @@ -127,7 +141,7 @@ export default { }, }, { - func: this.rowOpration, + func: this.deleteFunc, style: { color: "#FA6400", }, @@ -142,10 +156,10 @@ export default { }, ], tableData: [ - { - title: "第一个", - isOpen: true, - }, + // { + // title: "第一个", + // isOpen: true, + // }, ], formList: [ { @@ -172,11 +186,52 @@ export default { }, ], form: {}, + deleteId: "", } }, watch: {}, - mounted() {}, + mounted() { + this.getArticleList() + }, methods: { + // åˆ é™¤ + deleteFunc(data) { + console.log(data) + this.deleteVisible = true + this.deleteId = data.id + }, + // ç¡®è®¤åˆ é™¤ + confirmDelete() { + this.deleteVisible = false + deleteArticle(this.deleteId) + .then((res) => { + if (res.code == 1) { + this.$message.success("åˆ é™¤æˆåŠŸ") + this.getArticleList() + } + }) + .catch(() => {}) + }, + // èŽ·å–æ–°é—»ä¼šè®® + getArticleList() { + this.listLoading = true + let params = { + size: this.pageSize, + current: this.pageIndex, + moduleType: "1", + } + articleList(params) + .then((res) => { + if (res.code == 1) { + this.tableData = [...res.data.records] + this.total = res.data.total + this.listLoading = false + } + }) + .catch((e) => { + this.listLoading = false + }) + }, // æ·»åŠ åŒ»è”体 addMedical() { this.addVisible = true @@ -195,6 +250,16 @@ export default { // å¯ç”¨çŠ¶æ€ openChage(data, index) { console.log(data, index) + let params = { + id: data.id, + status: data.status ? 1 : 0, + } + articleEnable(params).then((res) => { + if (res.code == 1) { + // this.$message.success("ä¿å˜æˆåŠŸ") + this.getArticleList() + } + }) }, }, } @@ -231,7 +296,7 @@ export default { ::v-deep .el-dialog__footer { border-top: none; text-align: center; - .el-button { + .f-btn { width: 100px; height: 32px; background: #4e68ff; diff --git a/src/views/systems/operation-management/components/NoticeAnnouncement.vue b/src/views/systems/operation-management/components/NoticeAnnouncement.vue index 2443a6b0277ea0fbcf7e7b6960db8ca2057c08e4..d8d04bb8aa8b528b4742b9dab9d32d7b3946ad74 100644 --- a/src/views/systems/operation-management/components/NoticeAnnouncement.vue +++ b/src/views/systems/operation-management/components/NoticeAnnouncement.vue @@ -60,6 +60,11 @@ <script> import CustomsTable from "@/components/CustomsTable" import paginationMixin from "@/components/TabComponents/mixin" +import { + articleList, + articleEnable, + deleteArticle, +} from "@/api/operation-management" export default { components: { CustomsTable, @@ -99,7 +104,7 @@ export default { label: "å¯ç”¨çжæ€", minWidth: 120, type: "switch", - value: "isOpen", + value: "status", func: this.openChage, }, { @@ -141,12 +146,7 @@ export default { ], }, ], - tableData: [ - { - title: "第一个", - isOpen: true, - }, - ], + tableData: [], formList: [ { type: "input", @@ -175,8 +175,30 @@ export default { } }, watch: {}, - mounted() {}, + mounted() { + this.getArticleList() + }, methods: { + // 获å–通知公告 + getArticleList() { + this.listLoading = true + let params = { + size: this.pageSize, + current: this.pageIndex, + moduleType: "2", + } + articleList(params) + .then((res) => { + if (res.code == 1) { + this.tableData = [...res.data.records] + this.total = res.data.total + this.listLoading = false + } + }) + .catch((e) => { + this.listLoading = false + }) + }, // æ·»åŠ åŒ»è”体 addMedical() { this.addVisible = true diff --git a/src/views/systems/operation-management/components/scientificResearch.vue b/src/views/systems/operation-management/components/scientificResearch.vue index 3ea145e1572539a73b56a07038f853b00d51f363..66fb909f0e1262fd0527dae0646726724c3bce10 100644 --- a/src/views/systems/operation-management/components/scientificResearch.vue +++ b/src/views/systems/operation-management/components/scientificResearch.vue @@ -94,7 +94,11 @@ import CustomsTable from "@/components/CustomsTable" import paginationMixin from "@/components/TabComponents/mixin" import ElUploadSelf from "@/components/Upload" - +import { + articleList, + articleEnable, + deleteArticle, +} from "@/api/operation-management" export default { components: { CustomsTable, @@ -255,8 +259,30 @@ export default { } }, watch: {}, - mounted() {}, + mounted() { + this.getArticleList() + }, methods: { + // 获å–å¥åº·ç§‘æ™® + getArticleList() { + this.listLoading = true + let params = { + size: this.pageSize, + current: this.pageIndex, + moduleType: "5", + } + articleList(params) + .then((res) => { + if (res.code == 1) { + this.tableData = [...res.data.records] + this.total = res.data.total + this.listLoading = false + } + }) + .catch((e) => { + this.listLoading = false + }) + }, // æ·»åŠ åŒ»è”体 addMedical() { this.addVisible = true